Welcome! Log In Create A New Profile

Advanced

Detects that the server is redirecting the address request cycle

September 13, 2011 05:34AM
hi all

add " if ($http_referer ~* "www.test.com") {
rewrite ^/(.*)$ http://www.xxx.com permanent;
}"

open browser 出现 “
This redirect page is incorrect
Detects that the server is redirecting the address request cycle“

remove " if ($http_referer ~* "www.test.com") {
rewrite ^/(.*)$ http://www.xxx.com permanent;
}"
are normal

nginx server config

server {
listen 80;
server_name www.xxx.com;
index index.htm index.html index.php;
root /www/xxx;

log_format wwwlogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data0/logs/wwwlogs.log;

location ^~ /index.php/mo {
rewrite ^/(.*)$ http://mo.xxx.com permanent;
}

if ($http_referer ~* "www.test.com") {
rewrite ^/(.*)$ http://www.xxx.com permanent;
}

location ~* \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
fastcgi_param REQUEST_URI $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
}


location ~* \.(jpg|png|jpeg|bmp|gif|swf|js|css) {
expires 7d;
}

location ~* \.apk$ {
limit_rate 80k;
}

rewrite ^/web/soft/index/category/(\d+)/?$ /category/$1 permanent;
rewrite ^/web/allSoft/soft/category/(\d+)/?$ /apk/list/$1 permanent;
rewrite ^/web/allSoft/soft/category/(\d+)/order/download_count/?$ /apk/list/$1?order=download_count permanent;
rewrite ^/web/allSoft/soft/category/(\d+)/order/release_time/?$ /apk/list/$1?order=release_time permanent;
rewrite ^/web/soft/show/id/(\d+)/?$ /apk/detail/$1 permanent;
rewrite ^/web/default/apk/id/(\d+)/?$ /apk/download/$1 permanent;
rewrite ^/web/allSoft/rec/?$ /apk/recommended permanent;
rewrite ^/web/search/all/q/(.*)/?$ /search?q=$1 permanent;
rewrite ^/web/rom/index/brand/(\d+)/?$ /rom/brand/$1 permanent;
rewrite ^/web/rom/index/?$ /rom permanent;
rewrite ^/web/rom/device/id/(\d+)/?/$ /rom/device/$1 permanent;
rewrite ^/web/rom/list/category/(.*)/device/(\d+)/?$ /rom/list/$1/$2 permanent;
rewrite ^/web/rom/show/id/(\d+)/?$ /rom/detail/$1 permanent;
rewrite ^/web/rom/api/level/(.*)/?$ /rom/level/$1 permanent;
rewrite ^/web/rom/download/id/(\d+)/?$ /rom/download/$1 permanent;
Subject Author Posted

Detects that the server is redirecting the address request cycle

liushaobo September 13, 2011 05:34AM

Re: Detects that the server is redirecting the address request cycle

Maxim Dounin September 13, 2011 07:38AM

Re: Detects that the server is redirecting the address request cycle

Sharl.Jimh.Tsin September 13, 2011 08:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 302
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready