Jump to content

Recommended Posts

Posted

Is there a way (probably with .htaccess) to divert all my sites traffic (index pages, and individual pages, sub folders, subdomains, etc) to one page while i do some maintenance?

Posted

The tricky part in this is setting up the redirect so that the target page does not get redirected as well. It seems to me that the easiest way to avoid this is to create the page you're going to display while your site is down with a different extension than what you use for the regular pages on your site.

 

Since your web site appears to use .php pages, I'd suggest creating a .html page to redirect your site to. Then you could use the following directive in your .htaccess file:

>RedirectMatch temp .*\.php$ http://www.thejerm.org/under_construction.html

This will redirect all *.php page requests to /under_construction.html.

 

I believe you will need to add this directive to the .htaccess file in your /public_html directory, as well as to the .htaccess file in each subdomain's directory (/public_html/subdomain).

 

Hope this helps...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...