Skip to content

Instantly share code, notes, and snippets.

@crnastena
Created October 20, 2013 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crnastena/7065020 to your computer and use it in GitHub Desktop.
Save crnastena/7065020 to your computer and use it in GitHub Desktop.
When you are trying to run WordPress on shared hosting Windows 2003, IIS 6 server, you might run into and issue with custom permalinks where custom permalinks might not work, such as /%postname%/ would return 404. If your ISP has ISAPI_Rewrite 2 installed, this might work for you. I've shorted httpd.ini to show just one example but this should w…
[ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?your-domain-name\.com
RewriteCond URL ^/site-path/(.*)
RewriteCond METHOD GET
RewriteRule ^/site-path/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?your-domain-name\.com
RewriteCond METHOD POST
RewriteRule ^/site-path/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?your-domain-name\.com
### RewriteRule (.*) /site-path/$1 [I,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([^.]*) /site-path/index.php/$1 [I,L]
RewriteRule (.*) /site-path/$1 [I,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment