Forum Moderators: phranque
I currently have my site running a toplist script with all traffic coming into "IN.PHP" as per normal.
Now i want to a different traffic script, My question is how can i redirect all the traffic coming into
"IN.PHP" to the new main page "INDEX.PHP" and keeping all the referer info so the new traffic script can track referers.
Im trying to do it through htaccess at the moment but my knowledge is lmited to say the least,
Ive tried this in a htaccess file:
Redirect 301 /in.php [mydomain.com...]
Which does redirect the surfer to the index.php page but all the referer info is lost and my new
trade script just picks up the referer as "http://www.mydomain.com/index.php" which is obviously no use.
Any one any ideas?
Thanks in advance guys.
Jim
This will connect the requested URL with the new internal filepath.
As it is a rewrite it will NOT have an [R] or [R=301] parameter on the end.
There's several thousand prior example code snippets here in the forum, and notes in several tutorials to get you started.
Thanks, ive come up with this:
<?php
{
header("Location: {$GLOBALS['FORWARD_URL']}");
exit;
}
?>
As an alternative ive replaced the contents of the old toplist in.php with the code above, So every time a server comes in through the old in.php linking method it does redirect to the index.php page i wanted it to and it keeps the referer info as i wanted.
However i have no idea how it works...
Will this method cause me any known problems does anyone know?
Thanks again guys.