Hitthescene01
03-07-2007, 12:30 AM
does anyone know of a php code that can make:
mysite.com/myspace-layouts/css/thelayoutname
to
mysite.com/myspace-layouts/index.php?layout=thelayoutname? id rather use php than mod re-write
Douglas
03-07-2007, 03:12 AM
Well just replace the (CONTENT) with whatever was in the first url:
<?php
if ($_GET['layout'] == 'thelayoutname') {
?>
(CONTENT)
<?php
}
?>
THis should work
Hitthescene01
03-07-2007, 10:57 AM
thanks for replying.
I already have the code so it will look like "index.php?layout=thelayoutname" but i have my files in a different folder and currently trying to access them looks like this "index.php?layout=css/thelayoutname" im trying to make it so the "css" part doesnt show
Douglas
03-08-2007, 03:22 AM
Just add the css/ part to the actual script, if you know what I mean
Hitthescene01
03-08-2007, 10:50 AM
kinda. Here is my code if that would help:
<?php
$tempCSS = $HTTP_GET_VARS["layout"];
if ($tempCSS != "") {
$loadCSS = $tempCSS;
} else {
/* sets a default CSS file if no querystring specified */
$loadCSS = "default";
};
$currentDesign = $loadCSS;
?>
Hitthescene01
03-08-2007, 11:03 AM
sorry to double post,but i figured it out.thanks for all of your help