我使用url shortener缩短的链接(如小url)会导致第一次重定向循环,但第二次会立即生效。
可能的原因:
htaccess的
DirectoryIndex index.php index.htm index.html
ErrorDocument 404 /error.php
Options +ExecCGI -Indexes
DirectoryIndex index.html index.htm index.php
DefaultLanguage en-US
AddDefaultCharset UTF-8
ServerSignature Off
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
#RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index_error.php [F,L]
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
RewriteCond %{THE_REQUEST} ^.*/index\.php
RewriteRule ^(.*)index.php$ /$1 [R=301,L]
#--removes .php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{QUERY_STRING} action=(.*)
RewriteRule ^([1-9][0-9]*)/([-.,_0-9a-zA-z]*)\.html$ job_details.php?query_string=$1&action=%1 [L,NC]
RewriteRule ^([1-9][0-9]*)/([-.,_0-9a-zA-z]*)\.html$ job_details.php?query_string=$1 [L,NC]
RewriteRule ^article_cat_([1-9][0-9]*)\.html$ article.php?cat_path=$1 [L]
RewriteRule ^article_([1-9][0-9]*)\.html$ article.php?article_id=$1 [L]
RewriteRule ^mobile/([1-9][0-9]*)/([-.,_0-9a-zA-z]*)\.html$ mobile/job_details.php?query_string=$1 [L]
AddHandler application/x-httpd-php53 .php .php5 .php4 .php3