0
我有一個.htaccess文件,並當過我型www.example.com/demo/index.php它不斷重定向我在一個循環中。至於爲什麼會這樣,我真的很困惑。mod_rewrite的改變地址欄無故
# Do not remove this line, otherwise mod_rewrite rules will stop working
RewriteBase/
Options +Multiviews
AddHandler application/x-httpd-php .css
AddHandler application/x-httpd-php .js
RewriteEngine On
#NC not case sensitive
#L last rule don't process futher
#R 301 changes the url to what you want
RewriteRule ^demo(.*)$ finished$1 [NC]
RewriteCond %{REQUEST_URI} ^/finished/.*$
RewriteRule ^finished/(.*)$ demo/$1 [NC,R=301,L]
你需要有'在Multiviews '?這可能是內容協商無意中在某處導致重定向的原因。 – 2013-05-03 04:53:39
我不必但沒想到可能會導致問題。認爲它只是擺脫了文件擴展名,但我可以嘗試 – 2013-05-03 05:02:11
改變它仍然有同樣的問題:( – 2013-05-03 05:03:50