Menu


How to redirect visitors to a maintenance page


Sometimes when you upgrade your site or software that is used on the site you need to replace your front page with a maintenance page. Otherwise you risk exposing important data or risk a security breach. The redirect should be a 302 type redirect to avoid the indexing of the page by search engines.

To activate a maintenance page you need to edit or create the .htaccess file and place the following code in the file:


RewriteEngine on
RewriteCond %{REQUEST_URI} !/yourmaintenancepage.html$
RewriteCond %{REMOTE_ADDR} !^10\.10\.10\.10
RewriteRule $ /yourmaintenancepage.html [R=302,L]


In this code you need to replace yourmaintenancepage with the name of your maintenance page and the IP address on line 3 with your IP address so you will have access to the site.





Apache categories


Apache Installation? | Apache Configuration | Apache Troubleshooting?

Back to > Software




Google Search

 
www.lacisoft.com
WWW
2009-2011 (c) Lacisoft.com