我遇到了.htaccess重寫規則的問題。GET參數和.htaccess - 奇怪的URL
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([a-zA-Z0-9-]+)/(.*)$ /other-app/application/$2&THEME=$1 [L]
我需要網址:
localhost:8443/other-app/application/nice-url-theme/index.php
localhost:8443/other-app/application/nice-url-theme/edit.php?edit&EDIT_ID=XX
localhost:8443/other-app/application/nice-url-theme/brow.php
localhost:8443/other-app/application/nice-url-theme/brow.phpPARAM1=XX&PARAM2=YY
如果我得到URL
localhost:8443/other-app/application/nice-url-theme/edit.php?edit&EDIT_ID=XX
它顯示錯誤404:其他-應用程序/應用/ edit.php & THEME =不錯,網址未找到主題。
參數星問題在哪裏?爲什麼它不能採用GET參數?
這是'.htaccess'在other-app/application /'目錄下嗎? – anubhava
是的,它是正確的目錄。 – ondrusu