To prevent the 404 errors, there is a single line which you can add to exclude such a foldername from being rewritten. Below a default .htaccess file for Wordpress:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
The line to add to this, to exclude a folder from being rewritten is:
RewriteCond %{REQUEST_URI} !^/(foldername|foldername/.*)$
Simply replace "foldername" with your own subfolder that needs to be excluded from the rewrite. So the complete .htaccess content would become:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/(foldername|foldername/.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
No comments:
Post a Comment