-
Redirection
Well.
Im running part of a gaming fansite, and on this game there are values for pieces of furniture etc.
Well on the site theres 2 links to the values on it
one is /rarevalues and the other is an actual domain on the same server
i need the /rarevalues directory to re-direct to the actual domain but as theyre running through the same directory i can figure a way of doing it. theres probably some simple way.
i thought
PHP Code:
<?
if(isset($_GET['rarevalues']));
redirect code here;
?>
might do it but then i thought it only checks if theres ?rarevalues and not /rarevalues.
and i couldnt find a good re-direct code.
Help please.
-
Maybe try htaccess redirection: Google
-
So you're looking for a .htaccess redirect?
Code:
RewriteEngine on
RewriteRule ^rarevalues http://example.com/ [R,L]
-
I think what you are looking for is:
PHP Code:
$pagetogoto = "index.php";
header ("Location: ".$pagetogoto);
This will redirect the page immediately when the PHP script reaches it.
Just make sure that the script has not output anything to the page yet as nothing can be sent to te browser before this is done.
Cheers
The Moose