gesf
New member
Not sure about what you really want, but... here goes a lil' idea:
This way you can pass to the file where this code is in, something like:
Example: index.php?something=contact
It will redirect to the proper location!
Code:
<?php
if (isset($_GET['something'])){
if($_GET['something'] == 'about'){
header('Location: http://www.site.com/about.php');
}
elseif($_GET['something'] == 'contact'){
header('Location: http://www.site.com/contact.php');
}
elseif($_GET['something'] == 'links'){
header('Location: http://www.site.com/links.php');
}
else{
header('Location: http://www.site.com/error404.php');
}
}
?>
Example: index.php?something=contact
It will redirect to the proper location!