mod_rewrite for maintenance pages?

Fix it!!

Postby Guest » Fri Dec 21, 2001 10:11 am

I am trying to setup a rewrite that will send all requests for the entire domain to one page, a page saying (for example) that we are currently installing new software blah blah and will be back up soon.

The obvious problem, of course, is that you can get stuck in an endless loop.

RedirectMatch temp .* /file/notice.html

seemed to get me the closest, but endless loops....

Does anybody have any idea about this? I've been toying with it for weeks and searching all over the place, I just can't seem to get it down.

Postby Brett » Sat Jan 19, 2002 5:12 pm

How 'bout something like this?

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/file/notice.html
RewriteRule ^(.*) file/notice.html [L]

<font size=-1>[ This Message was edited by: Brett on 2002-01-19 20:12 ]</font>
Posts: 82
Joined: Tue Jul 10, 2001 4:00 pm

Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 1 guest