Thanks for that, blendimc. Are you up and running here municipal?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
June 02, 2011 7:12am
Subscribe [6]#16 / Jun 22, 2011 1:20pm
Thanks for that, blendimc. Are you up and running here municipal?
#17 / Jul 04, 2011 8:06am
I’m using a modified version of the Detour add-on for this, and do the url-cleaning in PHP. Much more easy than mod_rewrite kung-fu.
Detour is for redirecting old/url to a new/url. But in the session_start function i do much of the cleanup and conversion (which, as said, can be hard to do with mod_rewrite in htaccess).
i’m using this for checking for pagination:
function utf8_lowercase($var)
{
// preserve pagination uppercase P for entries N for comments
if((strpos($var,'P')===0 OR strpos($var,'N')===0) && ctype_digit(substr($var, 1)))
{
return $var;
}
else
{
return mb_strtolower(urldecode($var));
}
}
$path_map = explode('/', $new_path);
$path_map = array_map("utf8_lowercase", $path_map); // utf8 array
$new_path = implode('/', array_map("urlencode",$path_map) ); // urlencoded string#18 / Jul 05, 2011 3:26pm
Thanks GDmac!