Configuration code for setting pseudo-static and 301 redirection in the Discuzx3 Forum
Source: Internet
Author: User
# Enable RewriteEngineOn in RewriteEngine mode # Modify/discuz in the following statement to your Forum directory address. if the program is placed in the root directory, modify/discuz to/RewriteBase/#301 to point to rewritecond % {http_host} ^ xxx.com [nc] rewriterule ^ (. *) $ http :/
# Enable RewriteEngine mode
RewriteEngine On
# Modify/In the following statement/
DiscuzAddress of your Forum directory. if the program is in the root directory/
DiscuzChange/
RewriteBase/
#301 point
Rewritecond % {http_host} ^ xxx.com [nc]
Rewriterule ^ (. *) $ http://www.xxx.com/#1 [L, R = 301]
# 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 ^ blog-([0-9] +)-([0-9] +) \. html $ home. php? Mod = space & uid = $1 & do = blog & id = $2 & % 1
RewriteCond % {QUERY_STRING} ^ (. *) $
RewriteRule ^ archiver/(fid | tid)-([0-9] +) \. html $ archiver/index. php? Action = $1 & value = $2 & % 1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service