作者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
1F:推 LPH66:如果是Apache的话google搜寻mod_rewrite 06/14 05:16
2F:推 alpe:ErrorDocument index.php 06/14 10:26
3F:→ alpe:redirect example.com/foo/* index.php 06/14 10:26
4F:推 ybite:会比较不推mod_rewrite,会有点小耗资源 06/14 16:37