View Single Post
Old 29th November 2012, 00:37
forrie forrie is offline
Junior Member
Join Date: Sep 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default Redirect all except one /24 to another URL

I'm having a devil of a time getting Apache's Rewrite* stuff to do what I need.

Basically, I have a range of IP space that I need to redirect to a specific URL /except/ one IP within that range. Everyone else in the world also gets the normal/default URL.

So, in pseudocode:

If matches all of BUT NOT
Redirect to

Specifically I am also redirecting any queries to ^/ to a specific page (ie: index.php) but I need the above conditional to apply.

I've tried many examples from out there and it's understandably confusing. It appears you can't really negate this in a RewriteCond loop, either -- I tried it.

Anyone know how to accomplish this correctly in apache 2.2?

Reply With Quote
Sponsored Links