2

I am having a fun time migrating a number of websites from IIS 6 to IIS 7. The new IIS 7 platform is two web servers using a shared configuration. This configuration is stored on a network share.

For all the sites I need a standard URL in the browser, so anyone visiting using sitename.com is redirected to www.sitename.com.

I have looked at the URL Rewrite module which would do the job but it doesn't work for a shared configuration :( Does anyone know the best way to achieve this in IIS 7?

3 Answers 3

0

I'm not sure how you've been handling this in IIS6 - but I'd handle it the same way we do in IIS6.

Namely just create separate "redirect" sites in IIS and configure them with the host headers you want forwarding. These sites would be configured to answer any requests for the non-www hosts with a 301 (permenant redirect) to the www site.

1
  • Yep that's how I did it in IIS 6. Thanks Steve. Mar 4, 2010 at 15:53
2

I should have read the documentation closer. The URL Rewrite module will work in a shared configuration, it has to be disabled for the setup and can be enabled when done.

I prefer this method as it removes the need for a website just for redirection and it will pass over the path to the target domain.

0

Why not handle that at the DNS level ?

1
  • Nice idea. Can you explain how? Mar 4, 2010 at 14:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .