这里的问题只针对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去掉#