I am performing an update to a site and so I want to create a 302 temporary redirection for all webpages with the exception of one specific page.
perishablepress.com has two articles on the topic for which I am currently using option 1:
- http://perishablepress.com/temporary-site-redirect-for-visitors-during-site-updates/
- http://perishablepress.com/htaccess-redirect-maintenance-page-site-updates/
These article refer to amending all pages, where as I have one page I want to keep live. (As it goes I’m struggling to get option 2 to work at all). Can anyone tell me what is the best way to achieve this?
To clarify I would like to:
- Have all pages redirect to
coming-soon.html(i.e. http://www.mywebsite.com/sample-page.html => http://www.mywebsite.com/coming-soon.html) - Add an exception for
/contact-us.htmlso that this request is processed normally (i.e.www.mywebsite.com/contact-us.html=> http://www.mywebsite.com/contact-us.html)
You may try this: