1. Log into the Discuz! X3.0 admin backend and enable the pseudo-static feature module so that your Discuz! X3.0 site supports “URL Rewriting”.
Go to Admin Backend -> Global -> SEO Settings -> URL Staticization (see Figure 1) -> select the site URL static format;
See the image below for the detailed steps:
2. Upload the .htaccess file:
After enabling the pseudo-static feature in step one, the second step is to upload the pseudo-static rewrite rules.
First, find the pseudo-static rewrite rules. Clicking on them will open a new page with six rule sets; we just need to select the second one. These rules can be found in the Discuz admin backend — right in the panel where we enabled pseudo-static rewriting, click “View Current Rewrite Rules” and select the rules under “Apache Web Server (Virtual Host)” as shown below.

The Discuz! X3.0 pseudo-static rule file is shown below. You can copy and paste it directly.
# Turn on the RewriteEngine
RewriteEngine On
# Modify /discuz below to your forum directory path; if the program is in the root directory, change /discuz to /
RewriteBase /
# Rewrite system rules — do not modify
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
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_/-]+)/.html$ plugin.php?id=$1:$2&%1
These rules are suitable for PHP virtual hosting under Linux environments. They work for both Discuz! X3.0 GBK and Discuz! X3.0 UTF-8 versions.
Attachment https://www.cnop.net/uploadfile/2015/0723/20150723031805190.zip