I'm trying to use a .htaccess to Redirect people that are not from a certain IP range.
Redirect is working ok, but I can't figure out how to do both at the same time:
- People within a certain range: access to content
- People outside of this range: get redirected somewhere else

Many thanks for your help


Have you tried mod_rewrite? For example,


  • looks really great this article. I've never found an article dealing with IP and Rewriting. Many thanks. – Warnaud Oct 21 '10 at 12:37
  • Glad it helped. :) – dmah Oct 22 '10 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.