Page 1 of 1

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

Posted: Fri Feb 09, 2007 8:08 pm
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

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

Posted: Sat Feb 10, 2007 10:49 am
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

Thanks

Posted: Sat Feb 10, 2007 4:05 pm
by Ralf Skirr
Hi Gavin,

you seem to know everything.
Thanks a lot.

Ralf