您的位置:首页 > 运维架构 > Apache

discuz7记录下url静态化的apache2.2配置

2009-05-17 15:29 411 查看
打开apache的配置文件,找到下面这句


LoadModule rewrite_module modules/mod_rewrite.so把前面的注释#去掉,

按照dz7的用户手里指示,把下面这段加到httpd.conf里:


<IfModule mod_rewrite.c>


RewriteEngine On


RewriteRule ^(.*)/archiver/((fid|tid)-[\w\-]+\.html)$



$1/archiver/index.php?$2


RewriteRule ^(.*)/forum-([0-9]+)-([0-9]+)\.html$ $1/forumdisplay.php?



fid=$2&page=$3


RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$



$1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3


RewriteRule ^(.*)/space-(username|uid)-(.+)\.html$ $1/space.php?$2=$3


RewriteRule ^(.*)/tag-(.+)\.html$ $1/tag.php?name=$2


</IfModule>
重启apache服务器,现在我的论坛支持url静态化了。
http://localhost/dz7/forum-6-1.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: