RewriteRule exception for static page outside WordPress
I'm searching Google since at least 20 minutes and I can't believe it's that hard to find...
It should be pretty easy but I can't figure it out...
THE PROBLEM:
I want to put a HTML file at the same level of my Wordpress, but don't want the RewriteRules to "trap" this page and think it's a redirect...
THE HTACC开发者_StackOverflow社区ESS:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# >> here << this next line is my TEST....
RewriteRule ^test\.htm$ test.htm [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Of course, a page called "test.htm" is uploaded on the server.
As stated, the line where I put my test doesn't work. It shows the WordPress homepage, instead of my "test.htm" page I uploaded.
You might try this one:
RewriteRule ^test\.htm$ - [PT,L]
It passes through (PT) the request and does not apply any further rules (L).
精彩评论