Our blog
Cookie Based 302 Redirector
If you have a site that is installed on your live server but for the moment you do not want to go live, this little code snippet will allow you to redirect any visitors who don't have a secret GET variable in the URL to a holding subdomain with a 302 redirect.
A 302 redirect is a temporary redirect. Search engine spiders will see this as a temporary thing and will not remove the original URL from their index.
Just put this at the top of any page you want to protect. For a Magento or any other MVC php site, just putting this on the top of the index.php file will protect the whole system.
Note this isn't real security, its just something to keep the spiders out. Please don't regard it as secure.
More...
Thomas Shinder Blog » Blog Archive » How to Allow HTTP 301 through ...
The Power of PHP | DizitalBlog
» PHP Tutorial : Cookies and sessions
RSS Feed