Hi,
I just posted a question in the Spider User Agent ID forum but think it belongs here. My htaccess file is using modrewrite, but I want to allow all bots to see my robots.txt file, but I'm not sure how to do that. So I posted this:
Can you mix and match SetEnv and Mod-rewrite? My htaccess file uses this to block bad bots:
RewriteEngine on
#
# Return 403-Forbidden to unwelcome/malicious user-agents
RewriteCond %{HTTP_USER_AGENT} ZmEu [NC]
RewriteRule ^ - [F]
So, if I want to allow all bots to see my robots.txt file, I need to do it with rewrite, I assume. So, would I add the
RewriteRule ^/robots\.txt$ - [L]
to the bottom of the htaccess file? Or will that cause all kinds of issues I can't imagine?
Also, if I have a bot blocked in robots.txt, I assume I must not also have it blocked in htaccess. Is that true? And if I determine that the bot does not obey robots.txt, I should remove the robots.txt entry and then include it in htaccess. Would having the bot in both places cause a "self-inflicted denial of service attack?"
I've had some suggestions to use SetEnv, but don't think I can mix and match.