Page 1 of 1

Frontpage detection

Posted: Tue Jan 17, 2006 12:36 am
by judebert
Garvin,

Since it's a US holiday, I'm using a part of my spare time to update the newsbox plugin. Templating is just a bit too problematic for one day, so I'm just trying to use your frontpage detection.

It almost works for me. The only problem is that when I go to my default URL (http://judebert.com/), it gets redirected to http://judebert.com/wasted_youth/index.html. The genpage.inc.php sees the index.html as the URI arguments, and notices that it's not index.php, so it decides I'm not on the frontpage.

Everywhere else is fine.

I tried modifying my .htaccess, but that had no noticeable effect. (Maybe I'm just not doing it right.) I tried changing my index file in the s9y configuration, but that was a big mistake: suddenly it couldn't find my CSS, and made weird links that didn't really go anywhere. I also tried changing the URL to my blog in s9y config, but that just got me 404s.

Finally, I changed the frontpage detection to:

Code: Select all

if ((empty($uri_addData['uriargs']) || trim($uri_addData['uriargs']) == $serendipity['indexFile'] || trim($uri_addData['uriargs']) == 'index.html') && empty($serendipity['GET']['subpage'])) {
    $uri_addData['startpage'] = true;
}
That works for me, but I don't know if it's a problem for others. I figured I'd better not go committing something I wasn't certain about, so I'm deferring it to you.

Comments?

Re: Frontpage detection

Posted: Tue Jan 17, 2006 9:30 am
by garvinhicking
How does it come that it redirects to "index.html" in first place? It should be changed so that it redirects to "index.php"...

Do you have a "index.html" file in your directory? How is the redirection performed? What does your .htaccess file look like?

Viele Grüße,
Garvin

Posted: Tue Jan 17, 2006 7:02 pm
by judebert
The search engines all expect index.html, from the old site structure. I think my domain name redirects there; I could change that.

I'll modify the .htaccess to redirect 301 to index.php, so the search engines understand and I don't lose my standings.

Thanks!

Posted: Wed Jan 18, 2006 8:48 am
by garvinhicking
Yes, I think such would do better than the other idea of modificating the PHP Code...

Regards,
Garvin