discuz
I saw that many friends encountered some problems when using DX2.0 to generate pseudo-static . In fact, many times, it is because the rules are wrong or there are no generated rules. Next, I will share the .htaccess file pseudo-static rules of DX2.0.

# Turn on RewriteEngine mode
RewriteEngine On
# Modify /discuz in the following statement to be the address of your forum directory. This example program is placed in the root directory.
RewriteBase /
# 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

[Usage]
If there is no .htaccess file in the root directory of your forum, then copy the above code, save it as .htaccess, and pass it to the root directory of the forum.


Hong Kong/United States/Domestic High Speed ​​VPS

postid
8539

Leave a Reply