28 lines
351 B
PHP
28 lines
351 B
PHP
<?php
|
|
include_once ("core/config.php");
|
|
|
|
$path = ltrim($_SERVER['REQUEST_URI'], '/');
|
|
|
|
$query = " SELECT
|
|
to_url
|
|
FROM
|
|
rewrite
|
|
WHERE
|
|
from_url = '$path'
|
|
AND
|
|
attivo = 1
|
|
";
|
|
|
|
$res = mysql_query( $query, $DB_ID );
|
|
|
|
if ($valori = mysql_fetch_array ( $res )) {
|
|
include ($valori['to_url']);
|
|
} else {
|
|
print "$path non c'e'";
|
|
exit;
|
|
}
|
|
|
|
|
|
|
|
?>
|