Apache如何开启Mod_rewrite模块以及PHPWind伪静态

五月 1, 2010 by · Leave a Comment 

一 开启Mod_rewrite模块

打开Apache2\conf\httpd.conf
搜索 LoadModule rewrite_module modules/mod_rewrite.so (2是这个)
去掉前面的#

搜索AllowOverride None 替换为 AllowOverride All

有好几个找到和下面代码类似的那个

</IfModule>

#
# “D:\usr\local\Apache2\cgi-bin” should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory “D:\usr\local\Apache2\cgi-bin”>
AllowOverride All
Options None
Order allow,deny
Allow from all
</Directory>

二 在Apache2\conf\httpd.conf 最后一行添加

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)-htm-(.*)$ $1.php?$2
</IfModule>

重新Apache

登陆PW后台开启全伪

About admin

注意:

1、本站启用了审核机制,你的留言可能稍后才会显示,请不要重复提交,谢谢。
2、留言时的头像是Gravatar提供的服务。想设置的看这里
3、评论者允许使用'@user空格'的方式将自己的评论通知另外评论者。

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha