Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

How to set Discuz! X2.5 Forum Win host and Linux host pseudo static

Date:2013-04-24 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

Beijing website construction Company Shangpin China: Recently, a friend asked me how to set pseudo static (ihucc.com). He is a forum built with the program of dzx2.5. As he is a novice in starting to build a website, he does not understand it very well. Recently, the version of dx2.5 was released. Now, let me share the setting methods of pseudo static rules for the win host and the linux host of the dx2.5 forum!

Windows host setting method:

Step 1: Create a file named httpd.ini. You can first create a new text on the computer, then copy the following code to this article, and then save it.

[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 ^(.*)/blog-([0-9]+)-([0-9]+).html(?(.*))*$ $1/home.php? mod=space&uid=$2&do=blog&id=$3&$5

RewriteRule ^(.*)/(fid|tid)-([0-9]+).html(?(.*))*$ $1/index.php? action=$2&value=$3&$5

After saving these codes into the text, rename the text to httpd.ini, and then upload it to the root directory of the website!

Step 2: Next, let's go to the background of the forum. Global - SEO settings - URL pseudo static, and then check all the boxes, as shown below:

 How to set Discuz! X2.5 Forum Win host and Linux host pseudo static
 How to set Discuz! X2.5 Forum Win host and Linux host pseudo static

Click Submit after checking all, OK, the pseudo static setting is successful, and then update the cache of the next forum to see the effect!

Linux host setting method:

If your space is a Linux host, you need to write the following URL static rules into the. htaccess file in the root directory of your website. The rules are as follows:

RewriteEngine On

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 ^([a-z]+)-(.+).html$ $1.php? rewrite=$2&%1

To set pseudo static, you need your virtual host to support pseudo static. If your virtual host does not support pseudo static, it is useless to set it!

You can first create a new text, and then copy these codes into the text, and save the text name as. htaccess, and then upload it to the root directory of the website. After uploading, you can also go to the background of the forum as above, global - SEO settings - URL pseudo static, and then check all the boxes inside, and update the cache to see the pseudo static effect!

This article was published on Seo website optimization Company Shangpin China //ihucc.com/


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.