Redirecting a page

M

mcp6453

I just installed blog software in a folder underneath root
(/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.
 
R

Roy Schestowitz

mcp6453 said:
I just installed blog software in a folder underneath root
(/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.

You should be able to re-direct at server level without any flickering. What
server are you on? What front-end?

Roy
 
K

Kim André Akerø

mcp6453 said:
I just installed blog software in a folder underneath root
(/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.

There's a simple trick to that, and I have two different methods to do it.
Observe:

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"); ?>
Nothing else.
 
S

solitaire

mcp6453 said:
Both methods work fine. Thanks!

I have misplaced my previous index page which redirected site visitors
to my menu page. What's the javascript for a simple redirect?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,811
Messages
2,569,693
Members
45,478
Latest member
dontilydondon

Latest Threads

Top