How to use Wordpress SEO Friendly URLs on Windows Server using ISAPI_Rewrite

Posted by Paul@outside5.com on Dec 1, 2008 in How To |

The SEO friendly URLs in Wordpress don’t seem to work natively on a Windows server as Windows doesn’t support URL rewriting without addons.

You can download ISAPI_Rewrite 2 here.  Just install it and add the following regular expressions into the httpd.ini file:

[ISAPI_Rewrite]

# Wordpress Rewrites
RewriteRule /([0-9]{4})/([0-9]{1,2})/ /index.php\?year=$1&monthnum=$2 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?feed=$4&name=$3 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/(.*)/trackback/?$ /wp-trackback.php\?year=$1&monthnum=$2&name=$3 [I,U,O]
RewriteRule /category/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?category_name=$1&feed=$2 [I,U,O]
RewriteRule /category/(.*) /index.php\?category_name=$1 [I,U,O]
RewriteRule /tag/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?tag=$1&feed=$2 [I,U,O]
RewriteRule /tag/(.*) /index.php\?tag=$1 [I,U,O]
RewriteRule /author/(.*)/(feed|rdf|rss|rss2|atom|rss2_comments)/?$ /index.php\?author_name=$1&
amp;feed=$2 [I,U,O]
RewriteRule /author/?(.*) /index.php\?author_name=$1 [I,U,O]
RewriteRule /([0-9]{4})/([0-9]{1,2})/?(.*) /index.php\?name=$3 [I,U,O]
RewriteRule /feed/(.*) /wp-rss2.php [I,U,O]
RewriteRule /comments/feed/(.*) /wp-commentsrss2.php [I,U,O]
RewriteRule /about/? /\?page_id=2 [I,L]
RewriteRule /page/? /index.php\?paged=$1 [I,L]

The above rules will rewrite your urls to work with the following mask:

/%year%/%monthnum%/%postname%/

to output http://blog.outside5.com/2008/12/how-to-use-wordpress-seo-friendly-urls-on-windows-server-using-ASAPI_Rewrite

Tags: , ,

1 Comment


[...] we have had a couple of emails following on from our post about how to use SEO friendly urls in Wordpress on windows server using isapi rewrite asking what SEO Friendly URLs are and why they are [...]


 

Reply

Copyright © 2012 Inside Outside5 All rights reserved. Theme by Laptop Geek.