Avatar of adlertech
adlertech
Flag for United States of America asked on

IIS 7 redirect

I need help with redirecting a URL. I am running IIS7 on Server EE 2008.

I would like to redirect http://test.company.com to http://testserver.company.local/production/index.htm.

Basically when a user types the URL test.company.com I want them to be redirected to testserver.company.local/production/index.htm

Thank you
Microsoft IIS Web ServerWindows Server 2008

Avatar of undefined
Last Comment
Gajendra Rathod

8/22/2022 - Mon
Paul MacDonald

Why not set the server up so testserver.company.local/production is the root of the site and then set index.htm as a default page?

I presume DNS already points test.company.com to testserver.company.local.
Adam Brown

Open IIS, go to the website, select HTTP Redirect from the window in the middle, and click the box that says redirect websites to: and put in the location you want to redirect to.

Edit: It should be noted that HTTP redirect can break certain web applications. RD Gateway, for instance (Found that out the hard way)
Dirk Kotte

create an dns entry for test.company.com pointing to your webserver.
create a new webpage listening to the url "test.company.com"
create a default document at this page redirecting the user to  http://testserver.company.local/production/index.htm
Your help has saved me hundreds of hours of internet surfing.
fblack61
adlertech

ASKER
Thank you all for you responses.

The DNS entry has already been created and tested.

I should also mention that the port it's listening on is 8183 so the actual link is http://testserver.company.local:8183/production/index.htm
Adam Brown

The method I mentioned will account for that without issues. Anything that lands on the root of the website will redirect to /production
adlertech

ASKER
Once I enable HTTP redirection in IIS 7, is my path going to be the location of the index.htm file?

Unfortunately we don't have anyone here who is all that familiar with IIS.

Thank you
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Adam Brown

Just put in http://testserver.company.local:8183/production/index.htm for the path and it will go exactly there.
adlertech

ASKER
Unfortunately this didn't work. I will have to continue working on this tomorrow.

Thank you
ASKER CERTIFIED SOLUTION
Gajendra Rathod

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.