首页 > mac 下 apache2 配置 rewrite_mod 问题

mac 下 apache2 配置 rewrite_mod 问题

已经在 /etc/apache2/httpd.conf 中

去掉了

LoadModule rewrite_module libexec/apache2/mod_rewrite.so 

前面的注释符号,phpinfo() 函数显示已加载 rewrite 模块

在 httpd.conf 文件末尾加入

RewriteEngine on
RewriteRule ^/t_(.*).html$ /test.php?id=$1

进行测试时 rewrite 不起作用, 出现 404 错误

输入地址为:
http://localhost/~gipanda/projects/t_test.html

错误显示:
The requested URL /~gipanda/projects/t_test.html was not found on this server.

请问这是为什呢。。?


遇到同样的问题请问怎么解决的


放到当前项目文件夹下的.htaccess 文件中。

【热门文章】
【热门文章】