0

.htaccess files have now been replaced and that function is now under the httpd.conf file under apache/conf.

I would like to know the syntax of allowing everyone except several ranges of ip address blocks.

I have looked at the documentation for the different directives for the file but i have not found anything that does what i am looking to do.

the order command does not seem to work with deny,allow or even allow,deny

order deny,allow
deny from 10.1.0.0/24

or even

order allow,deny
deny from 10.1.0.0/24

I tried both ways and they both wont allow anyone to view my webpage if done that way. It is currently set to:

require all granted

under the in the httpd.conf file.

Any help would be appreciated.

B4wii
  • 189
  • 1
  • 2
  • 6
  • A possible duplicate of [this](http://stackoverflow.com/questions/18376573/blocking-multiple-ip-ranges-using-mod-access-in-htaccess) stack question. – akm Mar 09 '14 at 09:34

1 Answers1

-1

You may use Deny Directives in apache configuration to acheive that:

  deny from 10.1.0.0/16

more information avaiable here.

akm
  • 830
  • 6
  • 20
  • I just made an edit where I just said what doesn't work. and that does not work. (not as intended at least. everything is blocked.) – B4wii Mar 09 '14 at 09:35
  • @B4wii are you sure that you are modifying correct configuration file ? – akm Mar 09 '14 at 09:41
  • As far as I can tell yes. this file has replaced all instances of the .htaccess according to the apache doccumentation. I'll post a link. http://httpd.apache.org/docs/current/howto/htaccess.html – B4wii Mar 09 '14 at 09:50