Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

blocing crtain domains from accesing our web site

Status
Not open for further replies.

DoubleV

Programmer
Jan 11, 2002
358
US
hi guys,
i never do anything on the server side, but there's always first time for everything, isn't it?
we would like to be able to block users coming from certain domains from accesing our web site. they woudl just get a "permission denied" or any other type of message instead of being able to view any web pages.
can it be done and how?
thanks. --------------------------------------------------
Goals are dreams with deadlines
 
Hi Val,

I am not quite sure if this is what you are asking for or not..

Order deny,allow
Allow from all
deny from domain.com
deny from otherdomain.com

You can either set this server wide or in a htaccess file.

If you are just wanting to do this on a few pages then you can use SSI conditional incudes to do it but that is a totally different way.

Hope this helps Wullie

sales@freshlookdesign.co.uk

 
Wullie,
thanks for the help.
they'd like the whole site to be blocked, so .htaccess seems to be they way to go.
so the next question is, i cannot seem to find one on our server, even though i am sure we have it (and i know we are running apache). i am looking in the root directory. where is my .htaccess file???

Valeria --------------------------------------------------
Goals are dreams with deadlines
 
You can also set firewall software so as to block certain domains, IP addresses, or range of IP addresses. Newposter
"Good judgment comes from experience. Experience comes from bad judgment."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top