URL Redirection for website running in IIS 6.0

I have one website running on my webserver[IIS 6.0 on windows 2003] with SSL and website name is abc.com, while SSL I have purchased for www.abc.com,

hence I need permanent redirection to www.abc.com, what would the better way to configure it with minimal/zero down time

Can I do it in application code/programming –what would be the downtime for this?-and what I need to configure-my website is running on .net

I can also configure it in IIS, but earlier configuration shows that there is one website named- abc [website name given in iis config]  and ssl is already running/configured on it, so how I can do the permanent redirection to www.abc.com [http/https]

Please suggest the better solution with minimal down time.
LVL 1
patronTechnical consultant Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mwochnickCommented:
I understand you want the following redirect
http://*.abc.com --> https://www.abc.com
and https://*.abc.com --> https://www.abc.com
Is my understanding correct?

and I don't understand what you mean in the last paragraph by abc [website name given in IIS config] more details or a screen shot if possible would help

also you ask can I do this in application code - what kind of code are you running? ASP.NET?
0
RovastarCommented:
You have one website abc.com already configured with SSL?? That is what is implied 1 website on the server and that this abc.com and that has ssl.
you have also purchased www.abc.com? a wildcard cert would make life a lot easier than having abc.com and www.abc.com as separate SSLs.

It is a little confusing please provide more details.

you can make one site abc.com and just have a http redirect to www.abc.com if needed but I am not sure what you are asking.
0
patronTechnical consultant Author Commented:
Ste is developed in ASP.NET, AND I WANT PERMANENT REDIRECTION TO WWW.ABC.COM, [http/https].
is this possible in application code?-if yes how can we configure it?
THANKS
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

patronTechnical consultant Author Commented:
SSL I HAVE PURCHASED FOR WWW.ABC.COM HENCE IF SOMEONE OPENS HTTPS://ABC,COM-GETTING CERTIFICATE ERROR,WHILE WHEN PUTTING HTTPS://WWW.ABC.COM- SITE COMMING WITH OUT ANY ERROR
0
mwochnickCommented:
you can code it or you can configure IIS

here are three articles on configuring IIS to do redirects
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/41c238b2-1188-488f-bf2d-464383b1bb08.mspx?mfr=true
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true
http://technet.microsoft.com/en-us/library/cc736641%28WS.10%29.aspx

here is some asp.net code

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-location.com");
}
</script>

0
patronTechnical consultant Author Commented:
Ok let me discuss with development Team?

also confirm like currently….
Website configured on IIS6 is abc.com , while SSL certificate we have  purchased for www.abc.com.
So now if I create new website www.abc.com in IIS and put the 301 redirection from earlier configured website abc.com to this www.abc.com –will it work without pouting the SSL again on www.abc.com
[newly configured website in IIS6
Or I need to assign the SSL from abc.com to www.abc.com?
Is there any other better way with minimal downtime?
0
mwochnickCommented:
the best thing you could do is to buy a wildcard cert that would cover abc.com, www.abc.com, foo.abc.com and any other *.abc.com - as Rovastar suggested.  

your current cert will only work for www.abc.com, you need to redirect from abc.com to www.abc.com and you need to deploy your app on www.abc.com otherwise you will get the warning
0
mwochnickCommented:
in the long run it is going to be cheaper to buy the wildcard cert than to try to work around this problem
0
patronTechnical consultant Author Commented:
that is not approved from my client end.. so what would be the better solution after this..?
0
patronTechnical consultant Author Commented:
Pls. help me to suggest the solution by using code only. i need to redirect abc.com to www.abc.com -can I achieve this task by using code only. And will it require any downtime?
Right now in my IIS there is one website named: abc  and SSL is also installed on the same website, so now what would be the better option to redirect abc.com to www.abc.com with zero or minimum downtime-should I go with code or IIS config and how need to proceed on it?
0
patronTechnical consultant Author Commented:
Please assist
0
mwochnickCommented:
you could try creating an Iframe on the new web siter that grabs the content from the old domain - leaving the old domain intact.  You would need to use the jquery plugin described in this article to accomplish this
http://benalman.com/projects/jquery-postmessage-plugin/

You will have some limitations using this technique imposed by Iframes (like they cannot be resized) and some browsers do not support Iframes (mobile) and you will definitely have to do some significant testing
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
patronTechnical consultant Author Commented:
ok Thanks
0
patronTechnical consultant Author Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.