How to divert to another location

cowasaki

TPer Emeritus
Suspended / Banned
Messages
19,708
Name
Darren
Edit My Images
Yes
How can I create a html file that simply re-directs users to another address?

I have found a number of links to my site from elsewhere that no longer exist so I wanted to create a html file that re-directs users to the main page.
 
Use a Meta tag in the <head> section of your page, ie:

<head>
<meta http-equiv="refresh" content="2;url=http://www.yournewpage.com">
</head>

The number 2 above is the time before the redirection in seconds.
 
It's worth noting that search engines don't follow meta redirects, so if you want to maintain rankings you should look at trying to use a .httaccess file.

Then use a meta redirect as a last resort.

I have not advertised the site yet but I did have the scripts on it. I noticed two foreign sites had links to specific pages with some people showing appreciation of the scripts. I have placed redirects at both of those locations.
 
you want a 301 redirect, if your site has cpanel control panel you should be able to set them up in there, the 301 tells the search engines and anyone's browser that follows the link that the page has moved permanently so they update to point to the new location
 
It's worth noting that search engines don't follow meta redirects, so if you want to maintain rankings you should look at trying to use a .httaccess file.

Then use a meta redirect as a last resort.

.htaccess (one 't').

I wouldn't normally pick up on spelling errors in posts but you have to get the filename right or apache will ignore it.
 
Thanks everyone. I have placed a redirecting html page at the two locations and that works. I will look into the other thing too.
 
Back
Top