homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

htaccess deny from expression
please explain

 9:49 pm on Aug 15, 2003 (gmt 0)

I was told to use this expression in my htaccess file.

deny from

I understand how to use the deny from function to deny a normal ip address, but what I don't understand is the Is this an ip range? Thanks.



 9:54 pm on Aug 15, 2003 (gmt 0)

you have to think about netmasks... /26 is the shortform is the netmask... do you know how ip numbers and netmasks work together?


 10:09 pm on Aug 15, 2003 (gmt 0)

Sorry, I don't.

Is this denying a range of ips?


 1:23 am on Aug 16, 2003 (gmt 0)

Yes it covers a range of IPs - you can write it in your .htaccess file exactly as you did in post #1.

Here's a good one-page intro to netmasks that actually explains it:




 5:20 am on Aug 16, 2003 (gmt 0)

So would be the same as the ip range of to

Is that correct?


 2:09 pm on Aug 16, 2003 (gmt 0)

well i have not calculated it myself, but if you translate the IP to binary, the first 26 characters should remain unchanged and the rest (6) should take on all conceivable values (0 and 1).

Set the remaining six to 000000 and 111111 respectively and calculate/translate to decimal - if that is what you have done, then you're right.

It seems very likely that it is from 192 to 255 though, in fact that would be my guess without calculating.



 5:34 pm on Aug 16, 2003 (gmt 0)

That's exactly what I've done.

Thank you, you've been very helpful.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved