Apache – Redirect all requests to a single page

We’re migrating servers at work, and I needed to show a single “We’re moving” page no matter what URL was requested. Here’s how to do it permanently, and temporarily:

RedirectMatch permanent .* http://yoursite.com/migration.html

RedirectMatch temp .* http://yoursite.com/migration.html

Make sure you point to a different domain than the one you’re migrating! 😉

By Phil Wiffen

Phil is an IT Professional working in Cambridge, England. He generally blogs about useful solutions that he comes across in his work/play.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *