I want to create a restricted area on a subdirectory, but there is some conflict with the htaccess auto generated from WorPdress on home page and so I got a redirect on 404 error page when I try to access on this subdirectory
I tried to exclude it from .htaccess on home page with:
RewriteCond %{REQUEST_URI} !(folder1|folder2|folder3) [NC]
but nothing. How can I solve it? Thank you!
You should modify WP htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/folder1/$
RewriteCond %{REQUEST_URI} !^/folder2/$
RewriteCond %{REQUEST_URI} !^/folder3/$
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With