[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Domain Name Forwarding

Asked by trixits in ISPs & Web Hosting, Active Server Pages (ASP)

Tags: Domain, Name, Forwarding

I have two domains:
1) www.existingdomain.com/newsite
2) www.newdomain.com

All of the links on the existingdomain.com/newsite are all relative.  As a result, anytime a user clicks on a link, it checks the server_name and returns the rest of the relative path.  Is there a way to have all links redirect to the newdomain.com and return the rest of the relative path?

Here is my  best attempt so far but it doesn't seem to work and I do not know what is broken...
1:
2:
3:
4:
5:
6:
7:
8:
CurrentFile = Request.ServerVariables("script_name")
CurrentDomain = Request.ServerVariables("server_name")
 
If CurrentDomain <> "www.existingdomain.com" Then
	DeleteCookie()
	URL = "http://www.newdomain.com/" & CurrentFile 
	Response.Redirect(URL)
End If
[+][-]10/19/09 06:29 PM, ID: 25610404Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/20/09 12:37 AM, ID: 25611719Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/20/09 10:22 AM, ID: 25616365Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/20/09 06:43 PM, ID: 25620205Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/20/09 10:06 PM, ID: 25620926Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/21/09 10:32 AM, ID: 25626243Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625