Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: ElFroggio on December 09, 2005, 06:00:11 PM
-
How to do a page redirect?
I have googled around and find that it should be done in the .htaccess file. There are many htacess files and they all are in horde. /home/httpd/html/horde/config, lib, scripts, templates...
I only want to redirect the main page so:
Redirect abc.com http://www.xyz.com/directory/file.html
I don't want to redirect any other page, meaning that abc.com/webmail and abc.com/server-manager still work.
Any suggestion?
-
I handle the rediret using an index.html file containing the following:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Redirect index.html Page</title>
<meta http-equiv="refresh" content="5; url=http://www.XXXXXXXX.com">
</head>
<BODY>
This page has been moved to http://www.XXXXXXX.com<br><br><br>
Please update your book marks.<br><br><br>
If your browser does not support redirection,<br> <br><br>
Please <a href="http://www.XXXXXX.com">Click Here</a>
</BODY>
</html>
The numer 5 is the seconds to wait before the redirect. You could also remove the un-needed parts of the code.
HTH
-
or put this in the page
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://yourwebsitepage.com" );
?>