Setting up WordPress permalinks on a Blacknight Windows account with ISAPI Rewrite installed

If your hosting your site on a Blacknight shared windows hosting account, you’ll likely have either ISAPI Rewrite 2 or ISAPI Rewrite 3 installed depending on which particular box you are on. The machine I was on was based on ISAPI Rewrite 2 so rewrite directives had to be placed in httpd.ini. My WordPress install was in the root so I created a httpd.ini file in there and added the following which got custom permalinks working for me. 

[ISAPI_Rewrite]

# 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]

If your using version 3 of ISAPI Rewrite you should just be able to manually create and use a .htaccess file like on Unix. Placing the following code in your .htaccess file should do the trick, although I’ve not confirmed this as I’m on version 2.

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php [L]

Leave a Reply

Your email address will not be published. Required fields are marked *