This is my WP htaccess
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
I want wordpress’ htaccess to stay out of the way when the link is to a standalone .html|.htm file inside the /ag directory.
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/ag
RewriteRule . /index.php [L]
Doesn’t work (I am aware the above code doesn’t even try to implement the requirement that the file ends in .html|.htm). What do I need?
The original rewrite conditions only rewrite if the file does not exist, and is not a directory.
Therefore if you have the file in a directory, there should be no rewrite happening.
Wrong answers here. This thread helps:
non-wordpress files in wordpress installation directory
You need to specifically exclude the directory using rewrite rules, or WordPress 3.4.1 won’t allow access.