这里的问题只针对php apache的重写功能出现的问题
其实只用查看apache的error.log的记录就知道是什么原因了。
这里的原因是:
.htaccess的内容应该是:
Options +FollowSymLinks //这句必须要,不然就会报这个错
# IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
同时,apache中配置文件httpd.conf要开启rewrite模块:
#LoadModule rewrite_module modules/mod_rewrite.so去掉#
本文介绍了解决PHP与Apache环境下重写规则错误的方法。通过正确配置.htaccess文件及启用Apache的rewrite模块来实现URL重写功能。
3030

被折叠的 条评论
为什么被折叠?



