Forum Moderators: phranque

Message Too Old, No Replies

301 redirect using .asis

Trying to redirect away from old website host to new

         

likabel

1:24 am on Aug 5, 2006 (gmt 0)

10+ Year Member



I was reading an old post from 2004, that I can't reply to. I am in exactly the same situation, my old website is hosted by Tripod/Lycos and they do not support .htaccess files used to redirect to a new web host. That method as I have read is said to be user & search engine friendly. I read in the old post found here tonight, that an index.asis with code would work with the above old host, just having a hard time figuring out exactly how to implement it.

encyclo

2:11 pm on Aug 5, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An "asis" file means that (if the underlying server supports it) the file in sent "as is", and is assumed to contain everything including HTTP headers which are usually added by the server.

So you can do a 301 Permanent redirect (at page-level only, not at site-wide level) with something like this:

Status: 301 Moved Permanently
Location: http://www.example.com/
Content-type: text/html; charset=ISO-8859-1
<html>
<head>
<title>Moved</title>
</head>
<body>
<h1>301 Moved Permanently</h1>
<p><a href="http://www.example.com/">New page</a></p>
</body>
</html>

Name it as "index.asis", replace your usual index.html and check your home page again - it should redirect to the new page assuming that the server accepts asis files.