Iis – Redirecting a domain name to an IIS Application

iisiis-7Wordpress

So since IIS only allows me to install applications (in this instance, wordpress) as containers under the parent of a Web Site, I need to redirect all the root URL requests sent to my domain, to the application's container.

Example:
Request to www.mywebsite.com should go to the application wordpress.

IIS Tree Looks as such:

Mywebsite (IIS web site)
-- wordpress (Application)

Is there a way to do this that is transparent to the user? I don't want to transform the URL into www.mywebsite.com/wordpress – I want it to remain www.mywebsite.com.

When a user hits www.mywebsite.com it should not transform the url in the user's browser – but the user should be hitting the wordpress application in IIS,=.

Another way to put this may be better stated as – is there a way to setup a web binding for an application specifically?

I have tried using HTTP Redirect and URL Rewrite but have been unsucessful in getting the results I desire.

(This is on a Win Server 2008R2 box with IIS7.5)

Best Answer

It sounds like you need to make the app be in the root of the site. So create a new directory outside of the inetput folder say C:\myweb.

In C:\myweb add your wordpres application Open up the IIS management console and add a new website called www.mydomain.com and point the root of the web to C:\myweb.

You can then use host headers to make it so www and any other subdoamin point to the same website in IIS.

Related Topic