Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
March 19, 2010, 04:19:12 PM

Pages: [1]   Go Down
  Print  
Author Topic: Deny Domain Name From Accessing my Site?  (Read 163 times)
RealDeal1115
Intergalactic Superstar
*****
Offline Offline

Posts: 162



« on: January 31, 2010, 04:37:50 PM »

I know that I can deny certain IP's from accessing my site using the IP  Deny Manager in the Control Panel but I want to deny anyone from accessing my site from a particular domain.  I realize I can translate the domain name to an IP however if the domain has a dynamic IP address, then this really would only be a temporary solution.

Could someone please tell me  if this is possible and if so, how?  Thanks
Logged
MrPhil
Professor in Nanotechnology
*****
Offline Offline

Posts: 4597



« Reply #1 on: January 31, 2010, 05:30:55 PM »

This would be a modified "hotlink protection". You might try it in your .htaccess:
Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} banned-domain\.com     [NC]
RewriteRule . - [F,NC]

HTTP_REFERER can be faked/spoofed, so it's not foolproof. Add more sites with [OR] flag.
Logged

jimlongo
Spaceship Captain
*****
Offline Offline

Posts: 116



WWW
« Reply #2 on: February 01, 2010, 06:33:17 AM »

you can also do this in .htaccess

Order Allow,Deny
Allow from all
Deny from domain.com
Logged

Pages: [1]   Go Up
  Print  
 
Jump to: