Frontpage detection
Posted: Tue Jan 17, 2006 12:36 am
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:
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?
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;
}Comments?