?
Solved

How to deny an PC name in .htaccess file?

Posted on 2009-05-14
3
Medium Priority
?
319 Views
Last Modified: 2013-11-16
Hi,
How can I deny an pc name with .htaccess file?

Thanks,
HPvH
0
Comment
Question by:HPvH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
cevoman earned 600 total points
ID: 24388406
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
 

Author Comment

by:HPvH
ID: 24388452
Ok, how to deny a range?
0
 
LVL 11

Assisted Solution

by:climbgunks
climbgunks earned 400 total points
ID: 24389560

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

Featured Post

Need protection from advanced malware attacks?

Look no further than WatchGuard's Total Security Suite, providing defense in depth against today's most headlining attacks like Petya 2.0 and WannaCry. Keep your organization out of the news with protection from known and unknown threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ransomware continues to be a growing problem for both personal and business users alike and Antivirus companies are still struggling to find a reliable way to protect you from this dangerous threat.
What You Need to Know when Searching for a Webhost Provider
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question