重新编译mod_rewrite.so:
在apache的源码安装目录中寻找mod_rewrite.c文件
find / -name mod_rewrite.c
/home/springshine/LAMP/httpd-2.2.3/modules/mappers/mod_rewrite.c
编译:
cd /home/springshine/LAMP/httpd-2.2.3/modules/mappers/
/usr/local/apache2/bin/apxs -c mod_rewrite.c
/usr/local/apache2/bin/apxs -i -a -n mod_rewrite mod_rewrite.la
如果没出错,在/usr/local/apache2/modules/ 中就会有mod_rewrite.so了
注意,然后只能在httpd.conf文件里添加以下一行,,
LoadModule rewrite_module modules/mod_rewrite.so
不能用Include等调用,
就可以正常引用了
阅读(3999) | 评论(0) | 转发(0) |