WordPress .htaccess explanation

28 views
Skip to first unread message

Apache Admin

unread,
Aug 27, 2007, 12:29:58 PM8/27/07
to Apache .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]


The rewrite rule matches anything that is not emptystring
and forwards it to the WordPress index.php.

Rules prior to that one cause that rule to execute only if the file or
directory that is requested doesn't physically exist. So if you have a
file called "ku.php" in your web root and someone makes a request
for it, then they receive it. But if someone makes a request for
ku.php and the file isn't present, then the request is redirected
toward WordPress' index.php.

>From there, the WP_Rewrite class takes over. This class is located in
/wp-includes/classes.php

To ovverride:

Code:
RewriteCond %{REQUEST_URI} ^/(stats/?|missing\.html|failed_auth\.html)
[NC]
RewriteRule .* - [L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Reply all
Reply to author
Forward
0 new messages