1)我想創建一個重寫規則,如果文件擴展名是PHP或(S)HTM(L),則會在URL末尾刪除文件。例如:HTACCESS重寫和重定向問題
This: http://www.example.com/index.php
Becomes: http://www.example.com/
This: http://www.example.com/index.php?action=login
Becomes: http://www.example.com/?action=login
2)我想設置一些URL我的.htaccess重定向,這樣,如果有人瀏覽某個路徑被自動重定向到的index.php。例如:
This: http://www.example.com/classes/(index.php)
Redirected To: http://www.example.com/(index.php)
This: http://www.example.com/classes/class.php
Redirected To: http://www.example.com/(index.php)
This: http://www.example.com/classes/style.css
Redirected To: http://www.example.com/(index.php)
有什麼線索嗎? 非常感謝!