trouble with directory index - spiders don't find the site

Having trouble installing serendipity?
Post Reply
Ralf Skirr
Regular
Posts: 30
Joined: Fri Jan 26, 2007 4:42 pm

trouble with directory index - spiders don't find the site

Post by Ralf Skirr »

Hi,

I've installed Serendipity into the folder /blog.
/blog is located in the root directory.

Now I want the blog to be the index page for the domain itself, so I made a htaccess file saying:
DirectoryIndex /blog/index.php

When I go to my domain in the browser it works fine. I simply use the domain name but I am shown the blog index which is inside the subfolder /blog. That's what I wanted
You can see that it works: http://www.InternetBusinessMastermind.com/

BUT: Several online services (like search engines, code validation tools and my Internet BusinessPromoter Software etc.) can't access my site at all. They get 404 error. (When they try the domain itself without the path to the subfolder.)

Any idea what's the reason for that and how to fix it?

Regards,
Ralf
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: trouble with directory index - spiders don't find the si

Post by garvinhicking »

Hi!

If you use a tool like LiveHTTPHeaders you will see the way you made it work uses a 404 error handler.

Instead of using the DirectoryIndex method, you should either use mod_Rewrite to redirect to the index, or you put a index.php file in your root which uses

header('Location: http://yourdomain/blog/index.php');

(or a HTML file witha meta redirect).

The way you solved it will produce a 404 because the s9y framework does not recognize "/" as a valid URL, because it's outside of its directory scope.

Best 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/
Ralf Skirr
Regular
Posts: 30
Joined: Fri Jan 26, 2007 4:42 pm

Thanks

Post by Ralf Skirr »

Hi Gavin,

you seem to know everything.
Thanks a lot.

Ralf
Post Reply