Forum Moderators: phranque

Message Too Old, No Replies

Protected files and ip .

Protected files and allow different ip addresse ...

         

marina

9:27 pm on Mar 22, 2009 (gmt 0)

10+ Year Member



Hello,

Im use apache 2.2

And im use this rule for protected my page of login :

RewriteCond %{REMOTE_ADDR} !=192.168.0.10
RewriteRule (?:login\.php)$ - [R=404]

And im happy, this rule is work.

But when im test for allow different ip, my rule is doesnt work :

RewriteCond %{REMOTE_ADDR} !=192.168.0.10¦192.168.30¦10.4.10.1
RewriteRule (?:login\.php)$ - [R=404]

If im use the last rule. All ip is not allow

I dont understand where is my error :(

Do you have any idea, for nice girl ;) ?

Kiss

g1smd

9:45 pm on Mar 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Remove the = sign from the RewriteCond line.

Put brackets around the list of all of the IPs.

Note that the second block only has three octets. It will match

192.168.30.***
and
***.192.168.30

Add [L] to the rule.

marina

10:37 pm on Mar 22, 2009 (gmt 0)

10+ Year Member



lol is so simple but im blond girl. But thank you is work :)

Kiss