技术交流QQ群:①185473046   ②190706903   ③203744115   网站地图
登录

下次自动登录
现在位置 >首页 > Discuz!
0℃
2011年11月02日 Apache ⁄ 被围观 13,087次+
1、首先确定Apache是否加载了Mod_rewrite 模块      方法: 检查 /etc/httpd/conf/httpd.conf 中是否存在以下两段代码 (具体路径可能会有所不同,但形式基本是一样的): (一)LoadModule rewrite_module libexec/mod_rewrite.so (二)AddModule mod_rewrite.c 如果存在,那么在文件/etc/httpd/conf/httpd.conf相应的主机目录配置中加入如下代码。(此时须注意,如果网站是通过虚拟主机来定义,请务必加到虚拟主机配置中去,否则可能无法使用。) 系统运维  www.osyunwei.com  温馨提醒:qihang01原创内容©版权所有,转...
阅读全文
1℃
2011年11月02日 Nginx ⁄ 被围观 20,116次+
在相应nginx配置文件的server中,添加如下代码 rewrite ^([^\.]*)/topic-(.+)\.html$ $1/portal.php?mod=topic&topic=$2 last; rewrite ^([^\.]*)/article-([0-9]+)-([0-9]+)\.html$ $1/portal.php?mod=view&aid=$2&page=$3 last; rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last; rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last; rewrite ...
阅读全文


Copyright© 2011-2024 系统运维 All rights reserved
版权声明:本站所有文章均为作者原创内容,如需转载,请注明出处及原文链接
陕ICP备11001040号-3