Windows2003 IIS6 Perfect solution to WordPress pseudo static method

Source: Internet
Author: User
Keywords Solution

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

A few days ago for a variety of reasons, Weven into a blog server system from Linux to switch back to Windows 2003, so the blog has not been able to visit the normal days.

Weven blog is used in the WordPress system, in Nginx under the pseudo static is quite easy to be very simple things, but the use of IIS6 is not so, online looking for some IIS under the pseudo static method, but mostly not ideal, such as the use of 404, The use of isapi_rewrite for pseudo static, there will always be such a problem.

Inadvertently found that you can use the WordPress URL rewrite perfect solution to the problems encountered.

Windows2003 IIS6 To configure the WordPress pseudo static method:

1. Download wordpress URL rewrite component

Download Address: Http://www.binaryfortress.com/wordpress-url-rewrite

WordPress URL rewrite main features and features: Completely without human intervention, fully automatic rewrite URL, only in the background set up a fixed link (permalinks) Form, you can directly use, like Linux under the same htaccess. You can use it in the first level of directories and subdirectories, or you can exclude directories that you do not need to override. This is very convenient, for some directories do not need URL rewrite to exclude it, will not cause inaccessible. Because it is fully automatic, it eliminates the fact that some directories and files cannot be implemented because of repeated rules encountered during write rewrite rules.

2. Install WordPress URL Rewrite

Unzip the downloaded compressed package to any location, as long as the Wordpressurlrewrite.ini and WordPressURLRewrite32.dll (32-bit version, 64-bit version corresponds to 64.dll) are available in the same folder.

Then open Wordpressurlrewrite.ini set up your blog directory, as well as the need to exclude the directory, Readme.txt in detail, here will not elaborate.

Next, select the appropriate site in IIS, load the WordPressURLRewrite32.dll in the ISAPI filter, load the restart IIS, or stop the Web site from starting.

  

Note: You cannot load the corresponding DLL file if you want to add write access to the directory where the DLL resides IIS_WPG.

If the arrows are red and down, try to check the permissions for the component folder.

To this configuration has been completely OK, because Weven into blog articles, columns, tag aliases are used in English, but if your blog path exists in Chinese name, you have to look down (the following methods for reprint, not personally tested).

Problems that exist and need to be addressed:

(1) Chinese tag cannot be accessed

Solution: You need to use isapi_rewrite to write a rule:

rewriterule/tag/(. *)/index\.php\?tag=$1

(2) There is no access to the website containing Chinese

1. Install Isapi_rewrite

The site root directory to create a new Httpd.ini file, with Notepad or editplus open, the rules are written in Httpd.ini, as follows:

[Isapi_rewrite]

# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32

rewriterule/tag/(. *)//index\.php\?tag=$1

Now the Chinese tag is accessible, but there are still problems.

Problems:

(1) The article on the tag page is more than 1 pages and cannot be accessed when paging

Workaround: Modify this rule to:

rewriterule/tag/[^/]+)/([^/]+)/? ([0-9]+)//index.php?tag=$1&paged=$3 [L]

But after the revision of Chinese tag and can not visit, do not worry, then look next.

2. Modify the classes.php in Wp-include

Continue to modify the 1th step of the problem, because the rewrite rules after the change in Chinese tag is still inaccessible, contains Chinese web site can not access. It is best to use specialized PHP editor tools such as EditPlus.

Original code:

$pathinfo = $_server[' path_info '];

To be replaced by:

$pathinfo = mb_convert_encoding ($_server[' path_info '), "UTF-8", "GBK");

Original code:

$req _uri = $_server[' Request_uri '];

To be replaced by:

$req _uri = mb_convert_encoding ($_server[' Request_uri '), "UTF-8", "GBK");

Save after the modification, and then upload the saved classes.php file and overwrite the original file, note the file save format.

Note: In this article copy code may appear in Chinese punctuation, please unify the English symbols to avoid errors.

This article starts Weven into the blog, the original address: http://www.weiwencheng.com/wordpress/win2003-iis6-wordpress-rewrite/

Related Article

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.