Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to redirect a web page to another server

Posted on 2011-04-19
15
Medium Priority
?
650 Views
Last Modified: 2012-08-13
The A-Record of my main website (www.example.com) points to my web server.
That works fine.

Recently I created a microsite but it is published on another server.
There are no A Records / domain names pointing to this other server.

I want my customers to go to www.example.com/summertour and see the web page that is on this second server.

My IT guy created a 'redirect' to make this work, but the visitor ends up seeing the IP address in the URL.

How can I get the site on my remote server to show up when a visitor goes to www.example.com/summertour AND keep the URL instead of showing the IP Address in the browser address bar?
0
Comment
Question by:ecarbone
  • 6
  • 5
  • 4
15 Comments
 
LVL 5

Expert Comment

by:h4mi
ID: 35424735
Short answer: Iframe with 100% height and width on your server, displaying the remote site.

You can not modify what goes into the url bar on a remote server. If you direct the traffic away from your server the url will change.
0
 
LVL 5

Expert Comment

by:h4mi
ID: 35424832
This is deprecated HTML and not recommended at all, but it will work. This goes into  www.example.com/summertour/index.html :

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Summer tour</title>
</head>
<frameset cols="*" frameborder="0" border="0" framespacing="0">
	<frame name="content" src="http://www.google.com/" marginheight="0" marginwidth="0" scrolling="auto" noresize>
<noframes>
<p>Redirecting...</p>
<script type="text/javascript">
<!--
window.location = "http://www.google.com/"
//-->
</script>
</noframes>
</frameset>
</html>

Open in new window


Change google to the correct address.

The real solution is to host the micro site at www.example.com/summertour and not at some external server.
0
 
LVL 10

Expert Comment

by:TekServer
ID: 35424987
Would it not be simpler to handle this with DNS rather than HTML?  You could create an ALIAS DNS record named summertour.example.com that points to the page on your remote server.  That way the address in the bar will only show summertour.example.com and the redirection should work as you intend.

hth!
:)
0
NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

 
LVL 10

Author Comment

by:ecarbone
ID: 35425217
you mean create a subdomain?
0
 
LVL 10

Expert Comment

by:TekServer
ID: 35425271
No, just an ALIAS record under the example.com domain.  You might know it as a CNAME record.

Here is a Microsoft article about ALIAS type DNS records:
http://support.microsoft.com/kb/168322

:)
0
 
LVL 10

Expert Comment

by:TekServer
ID: 35425389
My apologies, I missed part of your original description: "There are no A Records / domain names pointing to this other server."  An ALIAS record points to an existing A record, either on your own DNS domain or another domain, but it must be pointed at an existing A record.

So forget about the ALIAS record; just create a new A record (summertour.example.com) that points to the IP address of the other server.

:)
0
 
LVL 5

Assisted Solution

by:h4mi
h4mi earned 800 total points
ID: 35426470
What TekServer says is correct. If you can live with the address being summertour.example.com instead of example.com/summertour that is a lot better than going through the frame or redirect alternative.

The best solution though is still to move the external site to your server, unless something difficult is in the way of that :)
0
 
LVL 10

Author Comment

by:ecarbone
ID: 35435199
Hello everyone.
Their IT department created an A record for summertour.example.com

Now when you go to that address, the site loads BUT ... the URL immediately switches to the IP Address.
???

I'm thinking they did something wrong on their end?
What do you think?

I've created A records before and I've never seen this happen.
They are hosting multiple sites on this remote server, so I told them to use host headers on IIS.
They must have figured that part out at least, because the correct site IS loading in my browser.

Just dont understand why the address bar in my browser is changing to the IP Address.
0
 
LVL 10

Expert Comment

by:TekServer
ID: 35441105
That is rather odd.  Since it's public anyway, any chance we can get the actual address?  That way we can verify the symptoms on our side, run DNS tests, look at the HTML code, etc.

:)
0
 
LVL 10

Author Comment

by:ecarbone
ID: 35472205
i dont want to post the domain on EE because it will remain here forever, frozen in time ;-)

so instead, go to this website:
http://www.devlabs.us/temp/ee-help.html

there you will find the actual domain name I am referring to.

thanks for your help everyone!
0
 
LVL 5

Expert Comment

by:h4mi
ID: 35473137
The server doesn't seem to be responding. I tried pinging it (208.109.xxx.xx) and get only timeouts.
0
 
LVL 10

Author Comment

by:ecarbone
ID: 35474957
i sent them an email last night. maybe they are messing w dns.
...either that or they've really screwed it up ;-)

thanks again for your help!
0
 
LVL 10

Accepted Solution

by:
TekServer earned 1200 total points
ID: 35485109
Okay, I did an analysis of the web site HTTP headers using DNS Stuff, and the server seems to be returning the HTTP 301 "Moved Permanently" code, with the IP address as the redirect location.

If you have an account with DNS Stuff, you can see the results of the test here.  I've attached the raw HTTP headers below in the code section (with the IP address partially obscured), and you can see the RFC info about HTTP 301 here.  Wikipedia also has an article about HTTP 301 here, but it doesn't really say any more than the IETF RFC definition in the first link.

Now, with the disclaimer that HTTP codes are not my strong suit, I believe that the web server is where the problem needs to be fixed; I think that one of two things must be done:  either change the response to a regular "success" response (HTTP 200, I think), or change the redirect location to a URL instead of an IP address.

Hope this helps!
:)


HTTP/1.1 301 Moved Permanently
Date: Thu, 28 Apr 2011 16:23:21 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: http://208.109.x.x:80
Cache-Control: private
Content-Length: 0

Open in new window

0
 
LVL 10

Author Closing Comment

by:ecarbone
ID: 35703456
Thanks for your help! We ended up creating a subdomain (subdomain.example.com), and after ensuring host headers were properly configured on the web server, everything is working fine now. Thank You!!
0
 
LVL 10

Expert Comment

by:TekServer
ID: 35738664
You're very welcome; glad we could help!

:)
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This article will help to fix the below errors for MS Exchange Server 2016 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question