• 0

Restrict content by subnet


Question

Hi Everyone,

First off, I'd like to know if this is even possible, and if it is, could anyone point me in the right direction?

I've got a corporate intranet site i'm designing for my Auto Group. We've got 9 different brands and I'm setting up a page that has access to all of the manufacturer required sites. What I want to do is take any traffic from a specific subnet (i.e. 10.2.116.0/24 and 10.2.117.0/24 will point to Acura and 10.0.50.0 will point to Mercedes, etc.) and display content specific to those dealerships. I'm running an Apache 2.2 server with PHP5 and MySQL.

As always your help is much appreciated,

Mike

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

You could always use .htaccess to redirect users on that specific subnet to another page.

     RewriteCond %{REMOTE_ADDR} ^200\.200\.200
     RewriteRule .* http://yourpage.com/goes/here/ [R,L]

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.