15年
网站建设经验
佳速互联
佳速观点

当前位置:首页 >> 常见问题 >> 阿里云轻云服务器,discuzx3.1如何设置伪静态?

阿里云轻云服务器,discuzx3.1如何设置伪静态?

编辑:佳速互联   来源:佳速互联   浏览量:正在读取   时间:2014-06-27

客服沟通也没弄明白,我是轻服务器,win操作系统。在DZ论坛下载了一个web.config文件,基本所有链接做到了静态,但个别链接会出现404错误。 !!ZNemXct

后面佳速互联技术帮我解决了

 

Discuz! X3.1 VPS主机的伪静态httpd.conf规则设置:

(1)服务器系统及 PHP:WINNT / PHP v5.X.X 服务器软件:Microsoft-IIS/6.0

httpd.conf规则设置:

RegistrationName= wlqcwin

RegistrationCode= 2EAD-35GH-66NN-ZYBA

 

[ISAPI_Rewrite]

# 3600 = 1 hour

CacheClockRate 3600

RepeatLimit 32

 

# 自定义错误页面

 

ErrorDocument 404 /404/index.html

 

# 默认包含了301设置,此设置情况下sxbbs.org/aa.htm 会301跳至www.sxbbs.org/aa.htm,将sxbbs.org替换为您自己的域名就能实现自己的域名的301

 

# 第一条表示要做跳转的域名,第二条表示要跳转到的域名

 

RewriteCond %{HTTP:Host} ^sxbbs.org$

RewriteRule (.*) http://www.sxbbs.org$1 [NC,R=301]

 

# 多个域名做跳转的方法:

# 首先复制多个 RewriteCond 项,将域名改好 除了最后一项,其余的 RewriteCond 项最后都要加个参数 [OR]即可。

 

RewriteCond %{HTTP:Host} ^0722pp.com$[OR]

RewriteCond %{HTTP:Host} ^www.0722pp.com$[OR]

RewriteCond %{HTTP:Host} ^suiw.net$[OR]

RewriteCond %{HTTP:Host} ^www.suiw.net$[OR]

RewriteCond %{HTTP:Host} ^szggmm.com$[OR]

RewriteCond %{HTTP:Host} ^www.szggmm.com$[OR]

RewriteCond %{HTTP:Host} ^shuizhidu.cn$[OR]

RewriteCond %{HTTP:Host} ^www.shuizhidu.cn$[OR]

RewriteCond %{HTTP:Host} ^hao0722.cn$[OR]

RewriteCond %{HTTP:Host} ^www.hao0722.cn$[OR]

RewriteCond %{HTTP:Host} ^hbsztv.cn$[OR]

RewriteCond %{HTTP:Host} ^www.hbsztv.cn$

RewriteRule (.*) http://www.sxbbs.org$1 [NC,R=301]

 

# Protect httpd.ini and httpd.parse.errors files

# from accessing through HTTP

# Discuzx3.1

# 主题分类与分类信息伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/type-(w+)-([0-9]+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=forumdisplay&fid=$2&typeid=$3&typeid=$3&filter=typeid&page=$4

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/sort-(w+)-([0-9]+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=forumdisplay&fid=$2&sortid=$3&sortid=$3&filter=sortid&page=$4

#门户专题页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/topic-(.+).html(?(.*))*$ $1/portal.php?mod=topic&topic=$2&$4

#门户文章页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/article-([0-9]+)-([0-9]+).html(?(.*))*$ $1/portal.php?mod=view&aid=$2&page=$3&$5

#论坛主题列表页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/forum-(w+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$5

#论坛主题内容页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&$6

#群组主题列表页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/group-([0-9]+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=group&fid=$2&page=$3&$5

#用户个人主页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

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

#用户日志内容页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+).html(?(.*))*$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&$5

#论坛 Archiver 页伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/(fid|tid)-([0-9]+).html(?(.*))*$ $1/index.php?action=$2&value=$3&$5

#插件伪静态

RewriteCond %{QUERY_STRING} ^(.*)$

RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_-]+).html(?(.*))*$ $1/plugin.php?id=$2:$3&$5



友情链接: 阿里云小店 找商网 阿里云金牌合作伙伴 深圳阿里云服务器 长沙网站建设 深圳百度爱采购推广 深圳万网空间 深圳做网站 响应式网站建设 宝安做网站 深圳设计网站 阿里云ICP备案 宝安网站建设 南山网站建设 深圳营销型网站建设 深圳品牌网站建设 深圳微信网站建设 西乡网站建设 外贸网站建设
深圳网站建设
13723486509