Avatar of wesmanbigmig13
wesmanbigmig13
Flag for Australia asked on

IIS6 asp redirect for http:// to http://www.

Hi Experts

Please can you advise the simplest way to get a redirect put in place for a classic ASP site running on IIS6 on a Windows 2003 server, so that whenever someone tries to visit, for example, http://abc.com (without the www) it redirects them automatically to http://www.abc.com

I can also set ASP.net to run on this site, if that helps.

I would like a solution that does not require 3rd party software.

500 points.

Thanks
ASPWindows Server 2003Microsoft IIS Web Server

Avatar of undefined
Last Comment
wesmanbigmig13

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Big Monty

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.
wesmanbigmig13

ASKER
Minor update / extra code required - had to declare each of the variables, but once I did that it worked perfectly.

Dim svrHttps
Dim svrHost
Dim svrUrl
Dim svrQueryString
Dim svrNewUrl

Thank you!
Surone1

it's been too long for me to remember but the code might be able to be placed in global.asa . that should run for every (asp?) page. not sure if you neeed to configure IIS for it.
wesmanbigmig13

ASKER
I've requested that this question be closed as follows:

Accepted answer: 0 points for wesmanbigmig13's comment #a40482166

for the following reason:

Worked perfectly after declaring the variables in the code supplied.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
wesmanbigmig13

ASKER
Perfect, thank you