How to use ISAPI_Rewrite 3 with WordPress![]() Introduction WordPress is state-of-the-art publishing platform with a focus on aesthetics,
web standards and usability. No surprise it supports SE-friendly URLs. This
short article describes how to setup WordPress for usage with ISAPI_Rewrite
3. Getting and Installing WordPress You can download WordPress from this web page: http://wordpress.org/download/.
After downloading please install WordPress according to the installation instructions by the vendor. Note that in the installation wizard you may allow your blog to appear in search engines. This action enables indexing and will probably be important for you.
Picture 1. Enable indexing.
Enabling SE-friendly URLsBy default SE-friendly URLs are disabled. To enable this feature please go to WordPress administration panel. On the main page of administration panel please select "Settings" tab:
Picture 2. "Settings" tab.
Now please select "Permalinks" tab. On the opened page you can see some default schemes of prettifying your URLs.
Picture 3. "Permalinks" tab.
You may choose necessary scheme but notice that WordPress doesn't use .htaccess
file and ISAPI_Rewrite to process these permalinks. You will need to write your
own rules. Writing rules for .htaccessLet's write some simple rules for WordPress using ISAPI_Rewrite. Open "Permalinks" configuration as described above. Select "Custom Structure" radio box, and in adjacent field write /%post_id%/%postname% as shown on this picture:
Picture 4. "Custom Structure" field.
Please save changes. %post_id% and %postname% are special tag names. You can read more about tags here: http://codex.wordpress.org/Using_Permalinks. So we have configuration for URLs like http://domain.com/1/my-great-post, and now we need to write some rules in .htaccess file. Please create .htaccess file in the root folder of WordPress and write the following code into it:
These rules rewrite requests like /1/my-great-post to those like index.php?p=1,
but only if no such physical file of folder exist.
|