apache的重写机制,分为两步:
1,修改apache.conf,将其中的AllowOverride None,改成All
2,配置文件里加loadmodule rewrite.so 或者ubuntu系统可以用a2enmod rewrite命令并重启apache
在Unbuntu中重启Apache服务器出现错误:AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.等等。解决方法:
$ sudo vim /etc/apache2/apache2.conf
最后加入一句: ServerName localhost:80