http://rancidmoose.unitedti.org/forum/blog.php is working great and can even do stuff like this:
http://rancidmoose.unitedti.org/forum/blog.php?year=2006&month=05&num=01
however my problem is when in the redirect portion of my blogger template.
if you visit http://rancidmoose.unitedti.org/forum/blog/ it is supposed to redirect you to http://rancidmoose.unitedti.org/forum/blog.php and otherwise it takes the archive page url and parses that, then redirects to the corresponding blog.php url.
click around and see what happens.
here's my code:
Code:
http://rancidmoose.unitedti.org/forum/blog.php?year=2006&month=05&num=01
however my problem is when in the redirect portion of my blogger template.
if you visit http://rancidmoose.unitedti.org/forum/blog/ it is supposed to redirect you to http://rancidmoose.unitedti.org/forum/blog.php and otherwise it takes the archive page url and parses that, then redirects to the corresponding blog.php url.
click around and see what happens.
here's my code:
Code:
<?php
if(defined('IN_BLOG')){
echo('<!--- including "' . $incstr . '"---><!--- --->');
} else{
$url = $_SERVER['PATH_INFO'];
if(FALSE == strpos($url,'index.php')){
$i = strpos($url, 'blog/') + 5;
$i2 = strpos($url, '_',$i);
$year = substr($url,$i, $i2-$i);
$i = $i2 + 1;
$i2 = strpos($url,'_',$i);
$month = substr($url,$i, $i2-$i);
$i = $i2 + 1;
$i2 = strpos($url,'_',$i);
$num = substr($url,$i, $i2-$i);
$url = '../blog.php?year=' . $year . '&month=' . $month . '&num=' . $num;
} else{
$url = '../blog.php';
}
header('Location:'.$url);
}
?>