0
這裏是我的配置文件:nginx的301重定向不工作
server {
listen 80;
server_name moule-a-manque.com;
access_log /var/log/nginx/myvps.com.access.log;
error_log /var/log/nginx/myvps.com.error.log;
client_max_body_size 4M;
client_body_buffer_size 128k;
expires off;
rewrite http://www.moule-a-manque.com http://moule-a-manque.com permanent;
location/{
root /var/www/mom;
index index.html index.php;
}
我認爲應該工作,但是當我在http://nibbler.silktide.com/reports/moule-a-manque.com檢查它似乎是說,重定向不工作。
我正在做這件事嗎?如果是的話如何確保301重定向確實正在工作
您的nginx設置爲服務「moule-a-manque.com」,但您將測試發送到「nibbler.silktide.com」。你需要先排除這個基本問題。 – Dayo 2012-04-28 12:24:08