I had found if I blocked all files, include .php file, I can't open my website.
location ~* .*\.*$ {
if ($http_user_agent ~* baidu|spider) {
rewrite ^/ http://www.mydomain.com/robots.txt;
}
}
If I setup this rule into my nginx.conf file, I can't open my website. So, how can I block spider access to all files?
nginx-0.8.3
Edited 1 time(s). Last edit at 06/22/2009 01:48AM by filebackup.