Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Redirecting a page
April 10, 2005, 11:42 pm
rate this thread
(/serendipity). Now I have decided that I want nothing but the blog as
the web site such that surfing to http://www.domain.com immediately
redirects to http://www.domain.com/serendipity , invisible to the
visitor. Is there a way to do make this happen without all of the
flickering and "You are being redirected..." stuff?
The server has PHP on it, if that would be better than HTML. I do not
know much about either one.
Re: Redirecting a page
There's a simple trick to that, and I have two different methods to do it.
The Apache .htaccess method:
In a .htaccess file at the document root, place the following line:
Redirect /index.html http://www.example.com/serendipity
The PHP method:
In an index.php file at the document root, place the following:
<?php header("Location: http://www.example.com/serendipity "); ?>
Kim André Akerø
(remove NOSPAM to contact me directly)