discuz7记录下url静态化的apache2.2配置
生活随笔
收集整理的這篇文章主要介紹了
discuz7记录下url静态化的apache2.2配置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
打開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
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
轉載于:https://blog.51cto.com/xcf007/158710
總結
以上是生活随笔為你收集整理的discuz7记录下url静态化的apache2.2配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: GHOST系统封装详细图文教程
- 下一篇: 浅谈FTTH测试