hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Looking for a way to BLOCK a web page when it comes from a particular location
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Looking for a way to BLOCK a web page when it comes from a particular location

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 08-21-2002, 12:03 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95

Looking for a way to BLOCK a web page when it comes from a particular location


There's someone out there who has a web page of mine on their public profile. I don't want to be associated with this individual.

Using a service like Sitemeter it's possible to track where your hits are coming from.

Is it possible that to not only detect where a hit is coming from, but somehow block, or redirect (perhaps to another page that states "go away") when it comes from a specific location?

For example, if somone puts a link to my page on their profile at:
http://profiles.yahoo.com/(yahoo_ID_here)

Is it possible to reject or redirect the page by sensing where it comes from.

If previous page = x
then redirect to y
else, go to z

Is it possible to foward the page to another location if and only if it comes from a specific location or site?

Reply With Quote


Sponsored Links
  #2  
Old 08-21-2002, 12:09 AM
JTY JTY is offline
Community Guide
 
Join Date: Jun 2000
Location: Washington, USA
Posts: 5,976
Yes, you can do this. By using a script. Or perhaps Apache mod_rewrite could do this.

__________________
John T. Yocum -- Fluid Hosting
Shared - VPS - Dedicated - Colocation

Reply With Quote
  #3  
Old 08-21-2002, 12:13 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
Quote:
Originally posted by JTY
Yes, you can do this. By using a script. Or perhaps Apache mod_rewrite could do this.
Could you please explain how I can do this? Where is this script/code? I'm very good with HTML, but I don't know what Apache mod_rewrite is.

Thanks.

Reply With Quote
Sponsored Links
  #4  
Old 08-21-2002, 12:17 AM
prime prime is offline
Web Hosting Guru
 
Join Date: May 2002
Posts: 323
I can't go into the details, but someone else will probably be able to...

Wouldn't it be easier and faster, since he knows where the traffic is coming from, to use a .htaccess file and the HTTP_REFERER var?

__________________
- prime [admin@exclaimhosting.com]
ExclaimHosting - Your voice on the web.
Fast, reliable hosting, at prices you can afford.
http://www.exclaimhosting.com

Reply With Quote
  #5  
Old 08-21-2002, 12:21 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
Quote:
Originally posted by prime
Wouldn't it be easier and faster, since he knows where the traffic is coming from, to use a .htaccess file and the HTTP_REFERER var?
You're speaking in greek to me.

Is it possible to explain this in layman terms?

Reply With Quote
  #6  
Old 08-21-2002, 12:55 AM
dreamrae.com dreamrae.com is offline
Web Hosting Master
 
Join Date: Aug 2002
Location: Baltimore, Maryland
Posts: 580
php, perl, asp, jsp, c, .htaccess, firewall, i dunno 403 their asses

Reply With Quote
  #7  
Old 08-21-2002, 12:56 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
Would someone please tell me how to do this?

Reply With Quote
  #8  
Old 08-21-2002, 01:55 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
I posted this on several forums. Here, Emaildiscussions.com, Sitepoint...

and the winner is.....

CRAIGSLIST!!!!

http://forums.craigslist.org/?ID=2275667

Someone on Craigslist did this for me

Reply With Quote
  #9  
Old 08-21-2002, 02:02 AM
Website Rob Website Rob is offline
learning is in the doing
 
Join Date: Sep 2000
Location: Alberta, Canada
Posts: 3,109
Have a look at this thread:

http://www.webhostingtalk.com/showth...threadid=47529

if applicable, just post your questions there -- helps to keep it together.

The above method uses .htaccess (tops in my book) but there a way to restrict access by using a JS script, that follows your method:

If previous page = x
then redirect to y
else, go to z

but, being JS, would require the code to be on every page -- not good. Using .htaccess you can apply restricting to every page on your Web site, with only a few lines of code in an .htaccess file.

__________________
PotentProducts.com - for all your Hosting needs
Helping people Host, Create and Maintain their Web Site
ServerAdmin Services also available

Reply With Quote
  #10  
Old 08-21-2002, 02:21 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
Thanks, it appears the Craigslist method:

http://forums.craigslist.org/?ID=2275667

is working just fine for my needs.

Reply With Quote
  #11  
Old 08-21-2002, 03:54 AM
combs combs is offline
Junior Guru
 
Join Date: Aug 2002
Location: Plymouth
Posts: 212
anybody have any examples of this modrewrite?
I know some guy hotlinking my images.. leaeching of my bandwdith damnit.

Reply With Quote
  #12  
Old 08-21-2002, 04:11 AM
wf19 wf19 is offline
Junior Guru Wannabe
 
Join Date: Apr 2002
Location: San Francisco
Posts: 95
Quote:
Originally posted by combs
anybody have any examples of this modrewrite?
I know some guy hotlinking my images.. leaeching of my bandwdith damnit.
That's tricky. You can't put code into a .jpg file

Reply With Quote
  #13  
Old 08-21-2002, 04:25 AM
Website Rob Website Rob is offline
learning is in the doing
 
Join Date: Sep 2000
Location: Alberta, Canada
Posts: 3,109
Weelll, if your hoster provides Cpanel (like some do ) then you have Anti-leech built in. If not, you can go the route of downloading a free/pay-for script (lots around at the script sites; look under: anti-leech) or using the .htaccess method with a RewritCond directive.

If you are not familiar with Apache directives, you are best to get in touch with your Hoster to see if/how they have Rewrite rules working.

__________________
PotentProducts.com - for all your Hosting needs
Helping people Host, Create and Maintain their Web Site
ServerAdmin Services also available

Reply With Quote
  #14  
Old 08-21-2002, 05:35 AM
goldenplanet goldenplanet is offline
Web Hosting Guru
 
Join Date: Jul 2002
Location: Kolding, Denmark
Posts: 292
Put this in a .htaccess-file and the bugger is history:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
RewriteRule .*\.gif$ - [F,L]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
RewriteRule .*\.jpg$ - [F,L]

This will allow gifs and jpgs to be served if the HTTP_REFERER is your domain - and only you. Remember to add additional lines if you have parked domains and/or other subdomains than www!

__________________
Best regards,

Anders C. Madsen
Golden Planet Support - http://www.goldenplanet.com

Reply With Quote
  #15  
Old 08-21-2002, 10:26 AM
fog fog is offline
Web Hosting Master
 
Join Date: Jun 2002
Posts: 1,373
Quote:
anybody have any examples of this modrewrite?
I know some guy hotlinking my images.. leaeching of my bandwdith damnit.
Another less technical image (that I've actually seen done before) is to simply copy the image to another name, and change it on your site -- so if everyone was accessing, say, image.jpg, you would change your site to use image2.jpg. Then replace image.jpg with a blurry 1600x1200 picture of a tree or something... If the leechers are using it inline on their page, their site will look totally screwed up, and they'll quickly take the image down. (Be prepared for the site owner to be piping mad, but it's his own fault )

The .htaccess file probably works a lot better, but replacing the image is a lot more fun.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Liquid Web Updates Block Storage, Adding Scale, Cross Mounting Web Hosting News 2012-12-14 16:17:44
Liquid Web Block Storage Offering Provides Flexible, Affordable Storage Option Web Hosting News 2012-11-20 15:03:47
Rackspace Launches OpenStack-Powered Cloud Block Storage Solution Web Hosting News 2012-10-23 10:16:40
OpenStack Adds Networking, Block Storage to Sixth Release Folsom Web Hosting News 2012-09-28 10:55:29
Google Plans to Disable Online Revocation Checks in Future Chrome Versions Web Hosting News 2012-02-09 13:26:57


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?