1
我有一個簡單的重寫:htaccess的 - 重寫規則重定向到錯誤的URL
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?p=$1 [QSA]
任何不存在的文件應該被轉發到index.php
。但是,有一個目錄,images
,其中有七個圖像,但沒有index.php|html
。當我打開localhost/images
,沒有接近斜線(localhost/images/
工作正常),它將我重定向到localhost/images/?p=images
。我應該如何解決這個問題?