How to deny an PC name in .htaccess file?

Hi,
How can I deny an pc name with .htaccess file?

Thanks,
HPvH
HPvHAsked:
Who is Participating?
 
cevomanConnect With a Mentor Commented:
Hi there,

You can't as the server won't know about the PC name on a network
Only IP and Hostname

Kind regards
James
0
 
HPvHAuthor Commented:
Ok, how to deny a range?
0
 
Todd MummertConnect With a Mentor Commented:

you can allow/deny a range using a partial domain name, or a range of IP addresses.   The latter is a bit tricky as it has to be specified in CIDR notation, which allows you to specify a contigous set of addresses on well defined boundaries.      You may have to specify multiple small groups to deny if you're not blocking on netmask boundaries.


for example:
   deny from   9.0.0.0/8      # blocks all of the 9.0.0.0 network
   deny from  192.168.1.0/24  # blocks only the last octet (0-255) of addresses
   deny from cnn.com     # block on a domain name

see http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow    for more info on the allow/deny syntax

and

http://en.wikipedia.org/wiki/CIDR_address

for more info on CIDR notation

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.