Wordpress pseudo-static rules and configuration methods

Source: Internet
Author: User

Once set, the system will automatically write data. htaccess is a new rule. For SO, enter the custom structure:/% postname % at the end of the fixed link. After the rule is updated, go to the root directory of the server. htaccess: replace the rule with the following rule!

Apache wordpress pseudo-static rules

If your apache does not support htaccess, we can refer to: http://www.111cn.net/phper/apache/49022.htm
# BEGIN WordPress

The code is as follows: Copy code

RewriteEngine On
RewriteBase/
RewriteRule ^ archives/(d + )/? P = $1 [R = 301]
RewriteRule ^ index. php $-[L]
RewriteCond % {REQUEST_FILENAME }! -F
RewriteCond % {REQUEST_FILENAME }! -D
RewriteRule./index. php [L]

# END Modify by Jason 2011/8/3

In fact, a rule is added: RewriteRule ^ archives/(d + )/? P = $1 [R = 301]

Configure wordpress pseudo-static rules in iis


1. Create a file under the root directory of the website (web folder). The file name and suffix are in the format of httpd. ini.

Note: The file is easy to create. You can name the txt file as the file name at will.

2. Open the httpd. Ini file in txt/notepad mode and copy the following content to the file:

[ISAPI_Rewrite]

#3600 = 1 hour


CacheClockRate 3600

RepeatLimit 32

RewriteEngine On

# Pseudo-static rules

3. Write the pseudo-static rules of the corresponding website under "# Pseudo-static rules.

4. wordpress pseudo-static rules (subject to official documents ):

The code is as follows: Copy code

RewriteRule/images/(. *)/images/$1 [L]

RewriteRule/sitemap. xml/sitemap. xml [L]

RewriteRule/favicon. ico/favicon. ico [L]

# For file-based wordpress content (I. e. theme), admin, etc.

RewriteRule/wp-(. *)/wp-$1 [L]

# For normal wordpress content, via index. php

RewriteRule ^/$/index. php [L]

RewriteRule/(. *)/index. php/$1 [L]

Implement pseudo-static WordPress

1. Go to the Permalink Settings page in the WORDPRESS background -- Settings -- Permalinks. Select the static page format to be defined, select Custom Structure, Add. html or. htm to the end, and Save the Save Changes

2. Copy at the bottom of the Permalink Settings page. htaccess code (if you do not see the code at the bottom of the Permalink Settings page, the WP root directory already contains. the htaccess file and its property is 666. The following steps can be omitted)

3. Create a new text document (here I use Notepad ++ to edit it. In fact, I can use the text editor provided by Windows). Paste the code and save it as 1. htaccess.

4. Upload 1. htaccess to the WORDPRESS root directory and change 1. htaccess to. htaccess.

5. SUCCESS !!!

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.