Apache在Windows下使用Mod_rewrite模块
很简单的配置,确花了我一些时间,把它贴出来,给大家参考1 在Apache/conf/http.conf中,打开
LoadModule rewrite_module modules/mod_rewrite.so
AddModule mod_rewrite.c (看程序版本)
<Directory “C:/Program Files/Apache Group/Apache/htdocs”>
Options Indexes FollowSymLinks
裡面會包著一行:
AllowOverride None
把它改成
AllowOverride All
Order allow,deny
Allow from all
</Directory>
重新启动Apache使修改生效。
2 使用DOS的Copy命令建立.htaccess文件,如下
RewriteEngine on
RewriteBase /itscms
RewriteRule cms/.*?\.html cms.php
页:
[1]