Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Dec 28, 2010

Restricting your Magento instance to your IP address exclusively

Other visitors, including search spiders, will get the HTTP 503 Service Unavailable error.
Create a file 503.php in your Magento installation root:
  1. <?php
  2. header('HTTP/1.1 503 Service Unavailable');
  3. header('Content-Type: text/plain; charset=UTF-8');
  4. echo "503 Service Unavailable";
In .htaccess or in Apache server configuration, add the following rewrite rule:



Where 127.0.0.1 (note the backslashes before dots) should be replaced with your IP-address.
Once you save this .htaccess file or reload Apache configuration, your site will be down until you restore the initial state.