June 22, 2009 01:45AM
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.
Subject Author Posted

Can block spider access to all files, include .php file?

filebackup June 22, 2009 01:45AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 117
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready