Redirection

Having trouble installing serendipity?
Post Reply
neumannu47
Regular
Posts: 12
Joined: Sat Apr 09, 2005 6:13 am

Redirection

Post by neumannu47 »

Serendipity is installed in the /serendipity/ folder. I have now decided that I want the blog to be the home page. How can I redirect root to /serendipity/ seamlessly? HTML redirects are not very clean. Is there PHP code that makes the transition invisible? Any other suggestions welcome. If there is no code to do so, do I have to reinstall Serendipity in the root folder?
nohn
Regular
Posts: 37
Joined: Fri Oct 08, 2004 3:28 pm

Post by nohn »

<?php
header("Location: http://yourserver/serendipity/");
?>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Another opption is via a .htaccess in your root folder:

Code: Select all

DirectoryIndex serendipity/index.php
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
neumannu47
Regular
Posts: 12
Joined: Sat Apr 09, 2005 6:13 am

Post by neumannu47 »

Is DirectoryIndex serendipity/index.php the entire contents of the file?
neumannu47
Regular
Posts: 12
Joined: Sat Apr 09, 2005 6:13 am

Post by neumannu47 »

nohn wrote:<?php
header("Location: http://yourserver/serendipity/");
?>
When I try this and go to the root folder with IE, I get the correct page, but I also get this error: "Error: Access is denied to http://domain.com/serendipity/index.php ... havior.htc". Any idea what that means? If I surf directly to http://domain.com/serendipity, I do not get that error.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Please give us the full URL to the page you're using.

You must use the same URL to enter the page as you have configued in your "baseURL" Serendipity directive. Else the IE will complain that plugins are accessed frmo a different URL.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply