I'm using the following code in .htaccess to acheive silent redirection for friendly URLs:
Code: Select all
AddType application/x-httpd-php5 .php .phtml
RewriteEngine on
RewriteRule /infopods/([^/]+)/([^/]+)/([^/]+)$ /infopods.php?param=$1&id=$2&title=$3 [L]
RewriteRule /infopods/([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /infopods.php?param=$1&pre_id=$2&id=$3&title=$4 [L]
RewriteRule /whatson/results/([^/]+)/([^/]+)$ /whatson.php?results&ev_id=$1&title=$2 [L]
RewriteRule /findit/results/([^/]+)$ /findit.php?results&svc_id=$1 [L]
RewriteOptions MaxRedirects=3I'm constructing a breadcrumbing function:
Code: Select all
function construct_Breadcrumb() {
$item_type = $_REQUEST[param];
# what did we get?
switch($item_type) {
case "pod": # it's top-level, so all we have to do is show that we're on the infopods homepage
$breadcrumb_RetVal = "Infopods";
break;
case "article": # the user has chosen an infopod to browse, so we need to show them which one
$breadcrumb_RetVal = "Infopods > ".$_REQUEST[title];
$_SESSION[pod] = $_REQUEST[title];
break;
case "subarticle": # they've now chosen an articel from within the pod being viewed
$breadcrumb_RetVal = "Infopods > ".$_SESSION[pod]." > ".$_REQUEST[title];
$_SESSION[subarticle] = $_REQUEST[title];
break;
case "item": # final level - we need to show the pod, article and subarticle titles
$breadcrumb_RetVal = "Infopods > ".$_SESSION[pod]." > ".$_SESSION[article]." > ".$_REQUEST[title];
} # endswitch
return "Home > ".$breadcrumb_RetVal;
}So, what we should see is something like:
Home > Infopods > Article > Subarticle > Item
However, when the mod_rewrite stuff was placed in .htaccess, the server vars appear to be interfered with, and I now get:
Home > Infopods > AC_RunActiveContent.js > Subarticle ...
Can anyone suggest why this may be, and how it might be fixed? Is there something wrong with the mod_rewrite scripting??
thanks in advance