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
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
相关文章推荐
- apache2.2+mysql5.0+php5.1+Discuz!4.1配置完全手册
- 配置Apache Httpd Server 2.2 Virtual Host UrlRewrite
- apache2.2+mysql5.0+php5.1+Discuz!4.1配置
- discuz url静态化 apache,nginx
- apache2.2 + tomcat7 集群配置记录
- windows下配置php5+apache2.2+mysql5过程记录
- PHP5+APACHE2.2配置成功案例
- [原创]svn服务器的配置以及与apache httpd的整合工作记录
- 基于Apache2.2配置虚拟域名访问
- php-5.5.14在apache2.4.9中的配置记录
- LAMP(2)--结合discuz配置apache,mysql搭建论坛
- Apache 2.2和升级版2.4的httpd.conf配置差别总结
- Apache2.2和2.4配置的几个差异
- Discuz Windows 配置 iis7 URL 静态URL
- Apache2.2中配置虚拟子域名
- windos环境apache+mysql+php+Discuz的安装配置
- 给apache2.2加上mod_encoding模块後 php5.2.0 处理url出现bug
- apache配置多域名多站点记录
- apache 2.2 配置
- 使用apache配置tomcat应用整合php论坛-discuz