→ mervynW:看起來是經過 rewrite rule 出問題 10/13 11:28
→ maplenote:喔喔~我有用到rewrite 不過為什麼平常去開卻不會出錯@@? 10/13 11:50
→ KawasumiMai:Rewrite!! (對不起不要理在下... 10/13 11:53
→ maplenote:我設定大多是指定符合條件頁面 從http轉https或反轉 10/13 11:53
→ maplenote:這頁本身是http 試過https開有正常 也沒記錄到error 10/13 11:54
我附一下httpd.conf的http轉https rewrite的部分
因為這是我第一次設rewrite 大概有設錯吧Orz
如果各位願意指教的話 就麻煩看一下><
前三段都是強制轉https
最後一段是強制不同DNS轉成同一個(因為ssl只認一個)
感覺可能是最後2行出問題?最後2行是簡址轉向
根目錄/p/xxx 及 根目錄/~xxx 的轉向設定
在我的統計20025錯誤中的確有出現那兩行設定的網址
但也有不在整個rewrite裡面的網址出現錯誤
RewriteCond %{SCRIPT_FILENAME} !business
RewriteCond %{SCRIPT_FILENAME}
login(_)?(in)?(out)?([0-9])*\.php|signin\.php|trans\/review\.php|register\.php$
[NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/(.*) https://www.xxx.xxx.xxx/$1 [L,R,NE]
RewriteCond %{SCRIPT_FILENAME} !business
RewriteCond %{SCRIPT_FILENAME} supplier\/edit\.php$ [NC]
RewriteCond %{QUERY_STRING} manage=comp [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/(.*) https://www.xxx.xxx.xxx/$1 [L,R,NE]
RewriteCond %{SCRIPT_FILENAME} \/admin\/ [NC]
RewriteCond %{SCRIPT_FILENAME} !business
RewriteCond %{SCRIPT_FILENAME} !.+\.css$ [NC]
RewriteCond %{SCRIPT_FILENAME} !.+\.jpg$ [NC]
RewriteCond %{SCRIPT_FILENAME} !.+\.gif$ [NC]
RewriteCond %{SCRIPT_FILENAME} !.+\.png$ [NC]
RewriteCond %{SCRIPT_FILENAME} !.+\.swf$ [NC]
RewriteCond %{QUERY_STRING} !mod=ann [NC]
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^/(.*) https://www.xxx.xxx.xxx/$1 [L,R,NE]
RewriteCond %{SCRIPT_FILENAME} !phpmyadmin [NC]
RewriteCond %{SCRIPT_FILENAME} !business [NC]
RewriteCond %{HTTP_HOST} !^www\.xxx\.xxx\.xxx
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.xxx.xxx.xxx/$1 [L,R]
RewriteRule ^/(fu/)?(zh/)?p/(.+) /$1$2product/proMarketInfo.php?p=$3
[R,L]
RewriteRule ^/(fu/)?(zh/)?~(.+) /$1$2supplier/?id=$3 [R,L]
※ 編輯: maplenote 來自: 203.67.240.99 (10/13 13:54)