url rewrite

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

url rewrite

Post 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.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post 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/
Post Reply