Knowledge Essentials - 3Essentials Hosting

How do I set my site to redirect to a maintenance page?

Article ID: 641

 Back to Search

Question: How do I set my site to redirect any and all requests to a maintenance page (or any single specific page).

Answer: We recommend the following approach:

  1. Create your maintenance page and upload it to your site... call the page maintenance.html (or whatever you like, but we're using this name for this example).
  2. Request our support team to install the IIRF ISAPI Filter based URL Rewriter.
  3. Once installed, in your (ftproot)/cgi-bin folder will be a file called ISAPIRewrite4.ini.  This is the configuration file for the URL rewriter.  There will be one active rule in it, which we enable for testing... that rule is:
    • #RewriteRule  ^/[tT]est/(.*)
      RewriteRule  ^/rewrite[tT]est/(.*)           /
  4. Disable that rule by placing a # sign in front of it.
  5. Then, on a new line, put in the following rule:
    • #maint - all redirect rule
      RewriteRule ^(.*)$ /maintenance.html
  6. The IIRF URL rewriter will pick up on this change automatically.
  7. Test the feature by going to www.yourdomain.com/anyfolder/anyfile.html ... you should find that your redirected to www.yourdomain.com/maintenance.html.
  8. Once you're done with your maintenance, to disable, you can either:
    • simply remove any active rules from your isapirewrite4.ini config file
    • ask us to uninstall the IIRF URL rewriter.

 

 
Downloads Associated With This Article
No downloads are currently associated with this article.