I would like to redirect visitors from a defined IP range to a different location.
For example, I want clients from this IP range 85.204.0.0/16 to be redirected to clientsA.html and clients from this IP range 195.178.124.0/23 to be redirected to clientsB.html
I suppose .htaccess is involved, but I’m not sure what I’m supposed to do. Please help me.
You can use mod_rewrite for this:
This will turn ANY page into the clients-page. You might want to change the
^(.*)$part to (for example)clients.html-> that way only the client-page gets rewritten based on the IP address.