The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

apache rule for maintenance page

How to I tell apache 1.3 to serve any page under




been trying to find a clean way but I don't see it.

revert my buffer
Sunday, January 08, 2006
I think this should do it:

 RewriteEngine on
 RewriteCond %{HTTP_HOST} ^virtual\.host\.com$
 RewriteRule .* [NC,R,L]
Sunday, January 08, 2006
Would changing your default/custom 404 error page location work, or do you have files in the folder, and you want those to go to the coming-soon page too?
Ben Mc Send private email
Sunday, January 08, 2006
Bruce's approach should work fine, but you can drop the second line if you put it in <VirtualHost> context.
comp.lang.c refugee
Sunday, January 08, 2006
there are files under there. Actually I want to make two httpd.conf's, httpd.conf is a link to one of them:


then a script to run as root that causes all requests to get the "back soon" page, by changing the conf and restarting. While that is the case, the site symlinks are adjusted, database migration scripts run (if necessary). When all is well, link http.conf back to httpd.conf.on, restart apache, and off we go again.

I'll experiment with the rewrite rule and see how it goes. Thanks.
revert my buffer
Monday, January 09, 2006
# Use name-based virtual hosting.
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /path/to-this/
general damage
Monday, January 09, 2006
Oops, I misunderstood. I thought you were asking about general virtual host pages instead of one specific page.

Then I think I would use a redirect inside the virtual host configuation.

Redirect / /path/to/down-for-maint.html
general damage
Monday, January 09, 2006

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz