0
我都與我的重寫感到困惑。我要做到以下幾點:使用.htaccess刪除部分網址。 404重寫後
- example.com/ 不/需要的index.php→example.com/index.php
- example.com/ 不/需要 /文件夾/→ example.com/folder/
- 查詢參數應保留
我已經有一個重寫規則,沒有工作:
Options +FollowSymlinks -MultiViews
RewriteEngine On
RewriteBase/
RewriteRule ^not/needed(.*)$ $1 [L,R=302,QSA]
但是在重寫之後,我得到了404。我怎麼能告訴服務器它應該顯示來自原始URI的內容?