Search code examples
wordpressurl-rewritingiis-6permalinksisapi-rewrite

Wordpress Permalinks with ISAPI Rewrite 2


I'm trying to remove index.php from WordPress URLS.

I have this code in my httpd.ini file

[ISAPI_Rewrite]

RewriteCond Host: domain\.com
RewriteRule (.*) http\://www.domain.com$1 [I,RP]

RewriteRule /(?!index\.php)([^/.]+)/ /index.php/$1 [I]

RewriteRule /(?!index\.php)([^/.]+) /index.php/$1 [I,L]

This works but only for the category, for example domain.com/gear works, but domain.com/gear/post doesn't.

I found this post, but I couldn't really follow it http://www.helicontech.com/forum/14820-Wordpress_Permalinks_for_ISAPI_Rewrite_2.html

Any suggestions?


Solution

  • Try the following solution:

    [ISAPI_Rewrite]
    
    RewriteCond Host: domain\.com
    RewriteRule (.*) http\://www.domain.com$1 [I,RP]
    
    RewriteRule /(?!index\.php)([^.]+?)/? /index.php/$1 [I,L]