Hope I'm putting this in the appropriate mailing list.

A minor (I hope) potential feature request for httpd:

I wish to redirect clients not from a certain IP (e.g. my public IP at
home) to a different location, temporarily. The purpose of this is to
allow setting up a "maintenance" page so that I can properly test my
site with a piece of mind before actually making it available to
other visitors. I personally consider this a crucial ability.

The way I would usually solve it via Apache is to use RewriteCond and
RewriteRule. For httpd, however, it could suffice to implement a simple
"redirect" directive maybe:

redirect [not] <ip-address> to <uri>

I could then accomplish what I want using two location blocks:

location match "^/maintenance.html$" {
  root "/htdocs/example.com/maintenance"
}
location match ".*" {
  redirect not my.ho.me.ip to scheme://host/maintenance.html
}

I warmly welcome other ideas to accomplish this as well.

Thanks.

Reply via email to