1. For an Apache server, perform the following operations:
Create a. htaccess file and write the following pseudo-static rules into the file:Copy codeThe Code is as follows: # enable RewriteEngine Mode
RewriteEngine On
# Modify/discuz in the following statement to your forum directory address. If your program is in the root directory, change/discuz/
RewriteBase/discuzxx
# Do not modify Rewrite system rules
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ topic-(. +) \. html $ portal. php? Mod = topic & topic = $1 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ article-([0-9] +)-([0-9] +) \. html $ portal. php? Mod = view & aid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ forum-(\ w +)-([0-9] +) \. html $ forum. php? Mod = forumdisplay & fid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ thread-([0-9] +)-([0-9] +)-([0-9] +) \. html $ forum. php? Mod = viewthread & tid = $1 & extra = page \ % 3D $3 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ group-([0-9] +)-([0-9] +) \. html $ forum. php? Mod = group & fid = $1 & page = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ space-(username | uid)-(. +) \. html $ home. php? Mod = space & $1 = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ ([a-z] +)-(. +) \. html $ 1.php? Rewrite = $2 & % 1
2. For IIS6, perform the following operations:
Download the Discuzx 1.5 Rewrite component, upload it to the root directory of the server, and load Rewrite. dll from the uploaded Rewrite component in "ISAPI.
Or a friend who has installed rewrite
Httpd. iniCopy codeThe Code is as follows: [ISAPI_Rewrite]
#3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd. ini and httpd. parse. errors files
# From accessing through HTTP
RewriteRule ^ (. *)/topic-(. +) \. 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-(\ w +)-([0-9] +) \. 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 | uid)-(. +) \. html (\? (. *) * $1/home \. php \? Mod = space & $2 = $3 & $5
RewriteRule ^ (. *)/([a-z] +)-(. +) \. html (\? (. *) * $1/$2 \. php \? Rewrite = $3 & $5
If it is an IIS virtual host, repair the corresponding httpd. ini file.
Then, enable the pseudo static page in "Global" = "" optimization Settings "=" Search Engine Optimization.
I have succeeded in pseudo-static configuration in Apache and IIS environments.