Discuz! X3.1IIS/Apache/Linux, virtual host, VPS, independent host, server pseudo-static rule configuration tool/raw material Discuz! X3.1 virtual host or vps host method/Step 1 Discuz! Configure pseudo-static httpd. conf rules for X3.1VPS host: (1) server system and PHP: WINNT/PHPv5.X. X server software: Micro
Discuz! Configuration of pseudo-static rules for X3.1IIS/Apache/Linux, virtual host, VPS, independent host, and server
Tools/raw materials
Discuz! X3.1
Virtual host or vps host
Method/step
1
Discuz! Configure the pseudo-static httpd. conf rule for the X3.1VPS host:
(1) server system and PHP: WINNT/PHPv5.X. X server software: Microsoft-IIS/6.0
Httpd. conf rule settings:
RegistrationName = wlqcwin
RegistrationCode = 2EAD-35GH-66NN-ZYBA
[ISAPI_Rewrite]
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Custom error page
ErrorDocument 404/404/index.html
# The 301 setting is included by default. in this case, the lifecycle
# The first one indicates the domain name to jump to, and the second one indicates the domain name to jump
RewriteCond % {HTTP: Host} ^ sxbbs.org $
RewriteRule (. *) http://www.sxbbs.org $1 [NC, R = 301]
# How to redirect multiple domain names:
# Copy multiple RewriteCond items, and change the domain name except the last item. add the [OR] parameter to the end of the remaining RewriteCond items.
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. errorsfiles
# From accessing through HTTP
# Discuzx3.1
# Topic category and Category information pseudo-static
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/type-(w1_0000-(%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%0000-(%0-9%%%%%-(%0-9%%%%%%.html (? (. *) * $1/forum. php? Mod = forumdisplay & fid = $2 & sortid = $3 & sortid = $3 & filter = sortid & page = $4
# Portal topic page pseudo-static
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/topic-(.20.20..html (? (. *) * $1/portal. php? Mod = topic & topic = $2 & $4
# Pseudo-static portal article pages
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/article-(%0-9%%*-(%0-9%%%%%%%.html (? (. *) * $1/portal. php? Mod = view & aid = $2 & page = $3 & $5
# Pseudo-static forum topic list page
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/forum-(w1_0000-(0-91_00000000.html (? (. *) * $1/forum. php? Mod = forumdisplay & fid = $2 & page = $3 & $5
# Pseudo-static forum topic content pages
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
# Pseudo-static group topic list page
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/group-(%0-9%%}-(%0-9%%%%%%%.html (? (. *) * $1/forum. php? Mod = group & fid = $2 & page = $3 & $5
# User's personal homepage pseudo-static
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/space-(username | uid0000-(.20.0000.html (? (. *) * $1/home. php? Mod = space & $2 = $3 & $5
# Pseudo-static user log content pages
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/blog-(%0-9%%*-(%0-9%%%%%%%.html (? (. *) * $1/home. php? Mod = space & uid = $2 & do = blog & id = $3 & $5
# Pseudo-static Forum Archiver page
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/(fid | tid0000-(%0-9%%%%%.html (? (. *) * $1/index. php? Action = $2 & value = $3 & $5
# Pseudo-static plug-ins
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/([a-z] + [a-z0-9 _] * (-([a-z0-9_-]++).html (? (. *) * $1/plugin. php? Id = $2: $3 & $5
2
Httpd. ini:
[ISAPI_Rewrite]
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd. ini and httpd. parse. errorsfiles
# From accessing through HTTP
RewriteRule ^ (. *)/topic-(.20.20..html (? (. *) * $1/portal. php? Mod = topic & topic = $2 & $4
RewriteRule ^ (. *)/article-(%0-9%%*-(%0-9%%%%%%%.html (? (. *) * $1/portal. php? Mod = view & aid = $2 & page = $3 & $5
RewriteRule ^ (. *)/forum-(w1_0000-(0-91_00000000.html (? (. *) * $1/forum. php? Mod = forumdisplay & fid = $2 & page = $3 & $5
RewriteRule ^ (. *)/thread-(%0-9%%*-(%0-9%%%%%%%-(%0-9%%%%%%.html (? (. *) * $1/forum. php? Mod = viewthread & tid = $2 & extra = page \ % 3D $4 & page = $3 & $6
RewriteRule ^ (. *)/group-(%0-9%%}-(%0-9%%%%%%%.html (? (. *) * $1/forum. php? Mod = group & fid = $2 & page = $3 & $5
RewriteRule ^ (. *)/space-(username | uid0000-(.20.0000.html (? (. *) * $1/home. php? Mod = space & $2 = $3 & $5
RewriteRule ^ (. *)/blog-(%0-9%%*-(%0-9%%%%%%%.html (? (. *) * $1/home. php? Mod = space & uid = $2 & do = blog & id = $3 & $5
RewriteRule ^ (. *)/(fid | tid0000-(%0-9%%%%%.html (? (. *) * $1/index. php? Action = $2 & value = $3 & $5
RewriteRule ^ (. *)/([a-z] + [a-z0-9 _] * (-([a-z0-9_-]++).html (? (. *) * $1/plugin. php? Id = $2: $3 & $5
3
(2) server system and PHP: Linux/PHPv5.X. X server software: Apache. Htaccess rule configuration:
# Enable RewriteEngine mode
RewriteEngine On
ErrorDocument 404/404/index.html
RewriteCond % {HTTP_HOST} ^ sxbbs.org $ [NC]
RewriteRule ^ (. *) $ http://www.sxbbs.org/%1%r%301,l]
# Modify/In the following statement/DiscuzAddress of your Forum directory. if the program is in the root directory/DiscuzChange/
RewriteBase/
# Do not modify Rewrite system rules
RewriteEngine On
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule implements topic-(.20.20..html $ portal. php? Mod = topic & topic = $1 & % 1
# Discuz! Portal topic pseudo-static
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ (. *)/topic-(.20.20..html $1/portal. php? Mod = topic & topicid = $2 & % 1
# Other pseudo-static forums
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule into article-(%0-9%%%%%-(%0-9%%%%%%.html $ portal. php? Mod = view & aid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule used forum-(w00000000-(%0-9000000000000.html $ forum. php? Mod = forumdisplay & fid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
Rewriteruleappsthread-(%0-9%%%%%%-(%0-9%%%%%%%%%%%.html $ forum. php? Mod = viewthread & tid = $1 & extra = page \ % 3D $3 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule into group-(%0-9%%%%%-(%0-9%%%%%%.html $ forum. php? Mod = group & fid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ space-(username | uid316-(.20.0000.html $ home. php? Mod = space & $1 = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule implements blog-(%0-9%%%%%-(%0-9%%%%%%.html $ home. php? Mod = space & uid = $1 & do = blog & id = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ archiver/(fid | tid316-(%0-9%%%%%.html $ archiver/index. php? Action = $1 & value = $2 & % 1
# Topic category and Category information pseudo-static
RewriteCond % {QUERY_STRING} ^ (. *) $
Rewriterule+type-(w%%%-(%0-9%%%%%-(%0-9%%%%%%.html $ forum. php? Mod = forumdisplay & fid = $1 & typeid = $2 & typeid = $2 & filter = typeid & page = $3 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
Rewriterule+sort-(w%%%-(%0-9%%%%%-(%0-9%%%%%%.html $ forum. php? Mod = forumdisplay & fid = $1 & sortid = $2 & sortid = $2 & filter = sortid & page = $3 & % 1
# Pseudo-static plug-ins
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ ([a-z] + [a-z0-9 _] * (-([a-z0-9_-]+).html $ plugin. php? Id = $1: $2 & % 1
END