• I was inspired by this plugin and the method of login / register / reset password that hides the file wp-login.php via htaccess.

    I thought that using the same rule for the wp-config.php file and other files, such as files of the theme, it would increase security.

    Example my site.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-config\.php not_found [L]
    </IfModule>

    ——–

    I also wrote a .htaccess file that included in my theme folder.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp-content/themes/default/
    RewriteRule ^archive\.php not_found [L]
    RewriteRule ^comments\.php not_found [L]
    RewriteRule ^footer\.php not_found [L]
    RewriteRule ^functions\.php not_found [L]
    RewriteRule ^header\.php not_found [L]
    RewriteRule ^index\.php not_found [L]
    RewriteRule ^home\.php not_found [L]
    RewriteRule ^page\.php not_found [L]
    RewriteRule ^sidebar-static\.php not_found [L]
    RewriteRule ^single\.php not_found [L]
    </IfModule>

    Try directly of my website:
    https://djferik.it/wp-content/themes/default/home.php

    Seems to work perfectly without problems.
    You also do the tests with .htaccess.

    I’m no expert and hope understand me, maybe wrong.

    bye ??

  • The topic ‘inspired’ is closed to new replies.