December 26th, 2008, 02:35 PM
Redirection without a refferer script
Hi, I have client who would like a specific url, which would bring the viewer to a landing page. For example I have www.client.com/product
When this link is entered, the viewer would be taken to www.client.com/landing.php
Is this possible without a referrer script? I have seen this on the internet, but I am unfamiliar with it.
December 26th, 2008, 03:56 PM
So you want a redirection script?
window.location = 'Where to.php'
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=redirect.php">
Comments on this post
December 26th, 2008, 06:12 PM
Don't program anything that relys on the referrer. If you want them to have to visit the landing page first (which I don't recommend), then use a cookie instead. Set the cookie once they visit the landing page, on the other pages check to see whether the cookie exists or not when you decide whether to redirect them or show them the pages' content.
December 26th, 2008, 07:21 PM
A better option would be to use the mod_rewrite apache module. This way the client still sees the friendly url "/product" in their browser, but the server will load the "landing.php" content. It's also server side, so it will work for all visitors.
Try adding this to the .htaccess file of the base public directory
RewriteRule ^product$ landing.php [L]