Koozali.org: home of the SME Server

Page redirect

ElFroggio

Page redirect
« 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:

Code: [Select]
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?

cc_skavenger

Page redirect
« Reply #1 on: December 10, 2005, 12:49:44 AM »
I handle the rediret using an index.html file containing the following:

Code: [Select]
<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

Offline kruhm

  • *
  • 680
  • +0/-0
Page redirect
« Reply #2 on: December 11, 2005, 02:31:44 PM »
or put this in the page

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://yourwebsitepage.com" );
?>