• Hello!

    I have a site applying WPH, the .htaccess did updated but the mentioned files is still accessible which is hosted in Siteground. While another site hosted in Namecheap hides those files successfully.

    The settings is same as follow

    They are using 1.6.2.4 but the settings look a little bit different

    Not working version:
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^readme.html /index.php?wph-throw-404 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^wp-activate.php /index.php?wph-throw-404 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^license.txt /index.php?wph-throw-404 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^wp-signup.php /index.php?wph-throw-404 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^wp-register.php /index.php?wph-throw-404 [L]

    working version
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteRule ^license.txt /index.php?wph-throw-404 [L]
    RewriteCond %{ENV:REDIRECT_STATUS} ^$
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteCond %{REQUEST_FILENAME} !wp-activate.php [NC]
    RewriteCond %{REQUEST_FILENAME} !wp-cron.php [NC]
    RewriteCond %{REQUEST_FILENAME} !wp-signup.php [NC]
    RewriteCond %{REQUEST_FILENAME} !wp-register.php [NC]
    RewriteCond %{REQUEST_FILENAME} !wp-comments-post.php [NC]
    RewriteCond %{REQUEST_FILENAME} !wp-login.php [NC]
    RewriteRule ^wp-([a-z-])+.php /index.php?wph-throw-404 [L]

    Thanks in advance for confirming.

    • This topic was modified 4 years, 1 month ago by 西門 正 Code Guy. Reason: forget to add courteous wordings
Viewing 1 replies (of 1 total)
  • Plugin Contributor Maya

    (@tdgu)

    Hi,
    This is actually a Sitegroud related issue, as the rewrites are correct, but for some reason, the server does not process those correctly.
    The rewrites are different because you triggered different options through the plugin interface, for example the first block hides ( or it should ) the readme.html, wp-activate.php, license.txt, wp-signup.php and wp-register.php The second block, hides license.txt and any PHP files starting with wp- except wp-activate.php, wp-cron.php, wp-signup.php, wp-register.php, wp-comments-post.php, wp-login.php which are WordPress default files can be blocked through separate options.

    Try to use the same options on both installs so the rewrites will be the same.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘rewrite readme.html, license.txt etc still accessible in siteground host’ is closed to new replies.