Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    You say in a comment to an answer that you "want to achieve what [you] want using RewriteEngine". Why does it have to be done through mod_rewrite? Commented Aug 7, 2014 at 8:56
  • @MichaelKjörling, long story but I use allow from 192.168.1 because I want every body to reach test directory but in the case of manager directory I want forbid all IPs exept some see question updates. Commented Aug 7, 2014 at 9:07
  • Probably better asked on S.O. or ServerFault. Commented Aug 7, 2014 at 9:28
  • I saw now that you are using ^192\.168\.1\.*$. Is that intentional? I would expect that to match REMOTE_ADDR values like 192.168.1, 192.168.1. and 192.168.1......., not 192.168.1.123. Have you tried ^192\.168\.1\..*$? (Not perfect, but likely better.) Not too familiar with mod_rewrite and not sure this is your problem so not a full answer yet. Ping me with whether that works and if it does I'll type up a fuller answer. Commented Aug 7, 2014 at 9:52
  • @MichaelKjörling, Thanks for your answer but it still didn't work Idon't think that this is a regex problem I guess this is a conditional problem (AND, OR). Commented Aug 7, 2014 at 10:01