Ahora mismo lo tengo asi www.ejemplo.com/titulo/ y quiero cambiarlo
de este modo : www.ejemplo.com/categoria/titulo/
El codigo del index.php es este:
Código PHP:
//Get the name
$result = mysql_query("SELECT * FROM `Wallpapers` WHERE `approved` = '0' ORDER BY `ID` DESC LIMIT 0,9");
$x = 0;
while ($row = mysql_fetch_assoc($result)) {
$x += 1;
$Recent_Wallpapers .= "\n".'<div class="Box Left"'.$string.'>'."\n\t";
$Recent_Wallpapers .= '<div style="font-size: 1em; margin-bottom: 5px;"><a href="'.$image_path.strtolower(str_replace(" ", "-", $row['title'])).strtolower(str_replace(" ", "-", $row['Title'])).'/">'.$row['Title']."</a></div>";
$Recent_Wallpapers .= '<div class="img-shadow"><a href="'.$image_path.'imagen/'.strtolower(str_replace(" ", "-", $row['Title'])).'/"><img src="'.$image_path.'images/wallpapers/'.$row['Thumbnail'].'" alt="'.$row['Title'].'" /></a></div>';
$Recent_Wallpapers .= '</div>';
if (!is_int($x/3)){
$Recent_Wallpapers .= '<div class="Spacer"> </div>';
}
}
$Recent_Wallpapers .= '<div class="Clear"></div>';
echo $Recent_Wallpapers;
?>
Código PHP:
$website_url=str_replace('details.php',NULL,'http://www.'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']);
$pPath='/'.str_replace("/", "",$_SERVER['REQUEST_URI']);
$Title = str_replace("-", " ", $_GET['Title']);
$Category = $_GET['Category'];
include_once("mysql.php");
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}