I have the following code in my htaccess file which is related to wordpress.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I created a new folder called test
and when I try to access it from the browser, it shows a 404 error.
when I remove the code above from the htaccess file, I can access the new folder but the rest of the wordpress site breaks up. so I can't get rid of this code at all.
I tried adding this to the code:
RewriteCond %{REQUEST_URI} !^/test
so it looks like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/test
RewriteRule . /index.php [L]
</IfModule>
With no result and I still see the 404 error.
Could someone please advice on this issue?
I've tried many ways including this and still nothing works!!
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !(test) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>