Forum Moderators: phranque

Message Too Old, No Replies

I want url to automatically transfer you to another url.

user puts in widgets.net...goes to widget.com right away

         

jtmoney77

9:29 pm on Dec 11, 2003 (gmt 0)

10+ Year Member



Hello everyone,
I want to have url automatically transfer you to another url when a user enters it. I know alot of sites do this, especially if one url is a .com (widget.com)and another is the same name ending in .net (widget.net). I need the code to do this and which site needs the code. Do I still need both sites hosted or just the one all the traffic is going to?

Thanks,
Jeremy

hannamyluv

12:42 am on Dec 12, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, there are two ways to do this. Your hosting services may offer the ability to park both domains at the same IP, then whether the person types one or the other, they end up at the same place.

Or you can do a meta refresh. This is a meta tag that you add to the page at the site you want to take people FROM.

The code looks like this:

<META http-equiv="refresh" content="5;URL=http://www.pageiwantyoutogoto.com">

This would redirect your visitor to the proper location in 5 seconds. You can change the number of seconds to whatever you want.

The tag goes in the HEAD.

I believe it is advisable to do the parked option if possible, as some SE frown on the use of redirects.

vytal solutions

3:43 am on Dec 12, 2003 (gmt 0)

10+ Year Member



Why not just use the frame forward option offered by most registrars? It's free and you only need to host one domain.