<?php
if (stripos($_SERVER['HTTP_REFERER'], "foo.php") == false) {
echo "<script type='text/javascript'> document.location = 'foo.php?url=blah.php'; </script>";
}
?>
Page content here.
<?php
if (stripos($_SERVER['HTTP_REFERER'], "foo.php") == false) {
echo "<script type='text/javascript'> document.location = 'foo.php?url=fish.php'; </script>";
}
?>
Page content here.
Page content here.
<?php
echo "<a href='${_GET['url']}'>Continue to your page.</a>";
?>
You are not logged in, either login or create an account to post comments
RewriteEngine onRewriteCond %{REQUEST_URI} !^/(urls/you/dont/want/redirected|separated/by/pipes)/.*$
RewriteRule ^(.*)/$ foo.php?url=$1 [T=application/x-httpd-php]
And then in the foo.php doc you can put something like this:
<?phpecho('<a href="'.$_GET['url'].'">Click here to visit the page you wanted.</a>');
?>
This is the most basic way of doing it, and I'm not absolutely certain my htaccess stuff is absolutely correct.
posted by maxwelton at 2:19 AM on March 20