我想將所有請求從根目錄(除根目錄文件以外)重定向到dev目錄。當從根文件夾重寫到子文件夾時無限循環
example.com/anything到example.com/dev/index.php?url=anything。
我在的public_html htaccess的
RewriteEngine on
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /dev/?url=$1 [QSA,NC,R]
當我訪問http://example.com/anything我在做什麼錯了,它是造成死循環的錯誤?
謝謝!
爲什麼你在這裏有'R'(重定向)標誌?它不會暴露你的內部網址嗎? – anubhava