I have a shared host account set up with GoDaddy. I want to host multiple websites, each with their own domain name on the same account. Each site will be in its own subfolder, with only the web.config containing URL Rewrite rules in the root. I have it mostly working, but am unable to get the urls to work to my liking.
One of the sites I have is a Wordpress installation. The problem with this one is that I can't get my "pretty" permalinks working. I need to either include index.php or the subfolder that it resides in as part of the permalink.
I will also be hosting ASP.NET MVC 2 apps, but I want to focus on the Wordpress issue for now because that is more pressing. I only mention these other sites because I want to illustrate what my plans are a little better.
In the root, I have the following web.config file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<identity impersonate="false" />
</system.web>
<system.webServer>
<rewrite>
<rules>
<rule name="somewordpresssite.com" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?somewordpresssite.com" />
<add input="{PATH_INFO}" pattern="^/somewordpresssite/" negate="true" />
</conditions>
<action type="Rewrite" url="\somewordpresssite\{R:0}" />
</rule>
<rule name="someaspnetmvcsite.com" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?someaspnetmvcsite.com" />
<add input="{PATH_INFO}" pattern="^/someaspnetmvcsite/" negate="true" />
</conditions>
<action type="Rewrite" url="\someaspnetmvcsite\{R:0}" />
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
</system.webServer>
</configuration>
Then, in my Wordpress subfolder, I have the web.config for the Wordpress site:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
</conditions>
<action type="Rewrite" url="index.php"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
The URL Rewrite rules in the root seem to be working, at least well enough to have the two domains point to the two different sites. Is there something I need to do different to get pretty permalinks in my Worpress site?