Display maintenance site to requesters based on their IP address
- by user64294
Hi all.
I would like to set a special configuration in our apache web server.
I would like to display sites to the users according to their IP addresses.
We plan to upgrade our web sites. During the upgrade we'll put a maintenance site: so all the users which will connect to our web sites will get this site.
There are 200 websites affected by the upgrade, so I don't want to change apache settings for each one.
In order to test the upgrade i need to set apache to let only my IP address to access to asked site.
If my IP address is a.b.c.d and if i ask for test.com i want to see it.
but all other users, having a different IP address, should get the maintenane site even if they look for test.com.
Our webserver is hosted out of the office (ovh.com france). The testers are the developers at our office and me. We can take some sites and enable them for test in which we implement IP restrictions in each website: the idea is on these websites, if the visitor's IP address is different from our office IP address we redirect this visitor to our maintenance website else we display the website.
Is there a way to do this?
Thank you.