Nice URL's problem
Posted: Tue Jul 27, 2010 2:31 am
Hi there.
I have a problem, with my nice URL script.
It kind of works. The address 'muoa2/account' works fine, but if I add a / to end like 'muoa2/account/' or 'muoa2/account/5', my css disapears
The .htaccess code:
And my index.php code:
Anyone who can help with an idea?
I have a problem, with my nice URL script.
It kind of works. The address 'muoa2/account' works fine, but if I add a / to end like 'muoa2/account/' or 'muoa2/account/5', my css disapears
The .htaccess code:
Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./index.phpCode: Select all
$request = str_replace("/muoa2/", "", $_SERVER['REQUEST_URI']);
$params = split("/", $request);
$design = "design1";
$mappe = "dash/";
$side = "index";
if ($params[1] !=""){
$side = $params[1];
}
if ($params[0] !=""){
$mappe = $params[0] . "/";
}
#echo $mappe;
#echo "<br>pages/" . $mappe . $side . ".php";
$page_content = file_get_contents("design/". $design . "/main.html");
$page_content = str_replace("!!HEADER!!", file_get_contents("design/" . $design . "/header.php"),$page_content);
$page_content = str_replace("!!MENU!!", file_get_contents("design/" . $design . "/left_column.php"),$page_content);
$page_content = str_replace("!!FOOTER!!", file_get_contents("design/" . $design . "/footer.php"),$page_content);
if (file_exists("pages/" . $mappe . $side . ".php")) {
$page_content = str_replace("!!INDHOLD!!", file_get_contents("pages/" . $mappe . $side . ".php"),$page_content);
} else {
echo "404";
}
echo $page_content;