Page 1 of 1

url rewrite

Posted: Thu Nov 23, 2006 4:25 am
by raghavan20
i need to put a server under maintanence page whenever the server is updated...

i am running apache

when user accesses any url in myapp/ it should go to undermaintanence.php
http://myhost/myapp/

to


http://myhost/undermaintanence.php


i tried this but does not work

Code: Select all

RewriteEngine on
RewriteRule myapp/.* undermaintanence.php
is it also possible to write in .htaccess instead of httpd.conf so that the server can be brought under maintanence without restarting apache.

thanks.

Posted: Thu Nov 23, 2006 9:03 am
by raghavan20
i have another question

i want all requests to
http://myhost/myapp/*

apart from these ips
10.1.1.2
10.1.3.4

to
http://myhost/servernotavailable.php


But those two IPs should be able to access every page under http://myhost/myapp/