作者newbiegg (egg)
看板PHP
標題[請益] 請問如何讓不存在的路徑指向 index.php?
時間Sat Jun 14 04:38:54 2008
假設我有 example.com,而裡面除了 index.php 外沒有其他路徑或檔案。
請問要如何讓 example.com/foo 也可以顯示首頁(index.php)呢?
現在我只能看到 404, 希望可以讓所有不存在的路徑 wildcard 出現首頁。
不知是要在 web server 還是哪裡做設定。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 65.194.77.134
推 LPH66:如果是Apache的話google搜尋mod_rewrite 06/14 05:16
推 alpe:ErrorDocument index.php 06/14 10:26
→ alpe:redirect example.com/foo/* index.php 06/14 10:26
推 ybite:會比較不推mod_rewrite,會有點小耗資源 06/14 16:37