作者rushcat (嗯)
看板PHP
标题Re: [请益] 如何在URL隐藏'.php'
时间Fri Dec 8 19:15:37 2006
不好意思 测试了很久 还是跑不出来
开启mod_rewrite的步骤确定完成
httpd.conf里
#LoadModule rewrite_module modules/mod_rewrite.so --- 把#拿掉
把 AllowOverride None 改成 AllowOverride All
在根目录底下建立 .htaccess (我丢在htdocs里)
windows底下不允许建立没有档名的档案 所以得用dos (ren test.txt .htaccess)
此时echo phpinfo() 也确定mod_rewrite module有载入
但是怎样都还是抓不到...orz
我的.htaccess里的内容
RewriteEngine on
RewriteBase /
RewriteRule ^
([A-Za-z0-9-]+)?/$ test.php?t=
$1 [L]
请问有办法测试是哪里出了问题吗!?
顺便提供 mod_rewrite的cheat sheet
http://www.ilovejackdaniels.com/mod_rewrite_cheat_sheet.png
这个blog还有很多其他的 很方便...XD"
http://www.ilovejackdaniels.com/cheat-sheets/
最後感激回答...
--
◢ █◣ ◢◢◣ ◢◣◥████
◢███◣ ◢ ◣ █╴█╴█ ████
███▉█ ◢█◢ ◣◢ ██ ≡███≡ ◥█
███▉█ ◢▉█ ◢██ ███ ◢██ ◢██ ███ ◥█﹋█◤ ◎ █
█▇▇▇◤ █▉█ █▇▇ █▇▏ ▉▇▇ █▉█ ██ ▉▉█▏▏/ ◢█
██▇▏◣ █▇█ ▇▇█ ██▏ ███ █▇█▎██ █▉▉█▏▏█ rushcat
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.119.199.250
※ 编辑: rushcat 来自: 140.119.199.250 (12/08 21:03)