Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

URL redirection

Status
Not open for further replies.
Lots of ways to do this.

If you are using IIS, you can take care of this by going to the Web Site Property settings and selecting the "Home-Directory Tab. For the content source, you can choose "Redirection to another URL" If you do,the Redirect-To entry field is enabled and you can enter " or whatever. A set of check boxes in the same form allow you to refine the behavior of the redirection.

If this does not give you what you want, you can use ASP's Response.Redirect method with something like
<% Response.Redirect =(&quot; %>

You can also create a redirect page at the old address which uses a Meta refresh tag in the redirect page's HEAD, e.g.
<META http-equiv=&quot;Refresh&quot; content=&quot;0;URL=http://www.newsite.com/page.html&quot;>;

Or you can use JavaScript’s location.replace method. For example, in the redirect page's HEAD, you can enter something like:
<SCRIPT language=&quot;JavaScript&quot;>
location.replace(&quot;</SCRIPT>

location.replace is supported in version 3 of both the Netscape and Microsoft Browsers.

Hope one of these techniques works for your situation.

Good Luck
DavidK
 
I need it to not be a redirect though.
 
Um ...when you say you &quot;need it not to be a redirect&quot; what exactly do you mean? Can you give an example of the kind of behavior you are looking for that makes what you are asking for not a redirect?
 
Like I said, this may be the wrong forum

Here is what should happen:

User types in in the browser

-here is what happens
Users system check DNS and resolves to an IP address
Browser pulls site info from headerinfo from IP address

-what I need is
DNS to resolve to to an IP address (oldsite and newsite are same IP)
Browser pulls site info from headerinfo Logfile for newsite doesn't show as a redirect.
 
It sounds like you want the user to not even be aware that they're seeing content from new site. (i.e.: still have oldsite.com in the URL bar even though they're seeing whatever is at newsite.com).

One way I can think of is to have both domains resolve to the same IP through DNS, and then add host headers for both of those domains to the web site in IIS that has the content the user should see. Then, no matter which domain they type in, they will see the same content, and they will appear to be separate domains.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top