I have a situation similar to a previous question that uses the following in the accepted answer:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC]
RewriteRule .* - [R=403,L]
It just seems the rules provided from URL above block access to everything (including homepage level)
www.example.com/tbd_templates/
www.example.com/custom_post/
what I really need is to block access to the directories I specified (/tbd_templates/
,/custom_post/
etc with status code 403) but allow access to the rest of the site structure.
My .htaccess
is:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
anyone can help me?