和客服溝通也沒弄明白,我是輕云服務(wù)器,win操作系統(tǒng)。在DZ論壇下載了一個web.config文件,基本所有鏈接做到了靜態(tài),但個別鏈接會出現(xiàn)404錯誤。
后面佳速互聯(lián)技術(shù)幫我解決了
Discuz! X3.1 VPS主機的偽靜態(tài)httpd.conf規(guī)則設(shè)置:
(1)服務(wù)器系統(tǒng)及 PHP:WINNT / PHP v5.X.X 服務(wù)器軟件:Microsoft-IIS/6.0
httpd.conf規(guī)則設(shè)置:
RegistrationName= wlqcwin
RegistrationCode= 2EAD-35GH-66NN-ZYBA
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# 自定義錯誤頁面
ErrorDocument 404 /404/index.html
# 默認(rèn)包含了301設(shè)置,此設(shè)置情況下sxbbs.org/aa.htm 會301跳至www.sxbbs.org/aa.htm,將sxbbs.org替換為您自己的域名就能實現(xiàn)自己的域名的301
# 第一條表示要做跳轉(zhuǎn)的域名,第二條表示要跳轉(zhuǎn)到的域名
RewriteCond %{HTTP:Host} ^sxbbs.org$
RewriteRule (.*) http://www.sxbbs.org$1 [NC,R=301]
# 多個域名做跳轉(zhuǎn)的方法:
# 首先復(fù)制多個 RewriteCond 項,將域名改好 除了最后一項,其余的 RewriteCond 項最后都要加個參數(shù) [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
# 主題分類與分類信息偽靜態(tài)
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
#門戶專題頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/topic-(.+).html(?(.*))*$ $1/portal.php?mod=topic&topic=$2&$4
#門戶文章頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/article-([0-9]+)-([0-9]+).html(?(.*))*$ $1/portal.php?mod=view&aid=$2&page=$3&$5
#論壇主題列表頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/forum-(w+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3&$5
#論壇主題內(nèi)容頁偽靜態(tài)
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
#群組主題列表頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/group-([0-9]+)-([0-9]+).html(?(.*))*$ $1/forum.php?mod=group&fid=$2&page=$3&$5
#用戶個人主頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/space-(username|uid)-(.+).html(?(.*))*$ $1/home.php?mod=space&$2=$3&$5
#用戶日志內(nèi)容頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/blog-([0-9]+)-([0-9]+).html(?(.*))*$ $1/home.php?mod=space&uid=$2&do=blog&id=$3&$5
#論壇 Archiver 頁偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/(fid|tid)-([0-9]+).html(?(.*))*$ $1/index.php?action=$2&value=$3&$5
#插件偽靜態(tài)
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_-]+).html(?(.*))*$ $1/plugin.php?id=$2:$3&$5