The MU forums have moved to WordPress.org

Sanitizing in .htaccess (modifying the default rewriterules) (1 post)

  1. andmed
    Member
    Posted 17 years ago #

    Hello!
    I have changed the two default rules in .htaccess, so they look like this:

    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) - [R=404,L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ - [R=404,L]

    Now ALL the requests go to index.php and get default blog's 404 page if the requested file missing.

    I am going to change blogs.php to the same effect, that missing file causes blogs's 404 error rather than simple text message "404 File not found"

    It works as I want.
    The only concern I have, do not I expose wpmu installation to additional security threats?

    (I understand what the default .htaceess rules do, but can not figure out WHY they are doing it)

    To know this you definitely need to know core files...

    Thank you!
    Andrey

    ps WPMU 2.61

About this Topic

  • Started 17 years ago by andmed