P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Reseller Only Forums > CPanel Control Panel

CPanel Control Panel Cpanel, questions, observations....

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Block based on Referer
Old
  (#1 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
Unhappy Block based on Referer - 06-22-2005, 07:54 PM

I've been reading about blocking incoming requests based on Referer. I'd like to do this for any referer that contains a certain word, such as "wild". I've read too many pages about this, and just need an answer.

The word I'm trying to match comes after the tld. For example:

http://anydomain.com/*wild*.*


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#2 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
06-22-2005, 09:10 PM

RewriteCond %{HTTP_REFERER} ^http://.*\..*/.*wild.*$ [NC]

I dont suggest using this way as it will block things like domain.com/bewilder.htm
not what you probably want.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#3 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
06-23-2005, 09:13 AM

Quote:
Originally Posted by midwest
RewriteCond %{HTTP_REFERER} ^http://.*\..*/.*wild.*$ [NC]

I dont suggest using this way as it will block things like domain.com/bewilder.htm
not what you probably want.
Thanks Ronnie. I needed a big hammer, and understand it is not a great solution.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#4 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
06-27-2005, 03:55 PM

Quote:
Originally Posted by midwest
RewriteCond %{HTTP_REFERER} ^http://.*\..*/.*wild.*$ [NC]

I dont suggest using this way as it will block things like domain.com/bewilder.htm
not what you probably want.
RewriteCond %{HTTP_REFERER} (somespammer\.com) [NC,OR]
Is this valid as written?


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#5 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
06-28-2005, 07:50 AM

no,
RewriteCond %{HTTP_REFERER} ^http://somespammer\.com$ [NC,OR]


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#6 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
07-09-2005, 08:43 AM

Will this work in an htaccess file?

SetEnvIfNoCase Referer poker spammer=yes
deny from env=spammer

Seems to be much simpler than rewritecond.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#7 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
07-09-2005, 09:10 AM

Looks right to me.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#8 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
07-09-2005, 10:48 PM

Quote:
Originally Posted by midwest
Looks right to me.
My htaccess:

SetEnvIfNoCase Referer poker spammer=yes
deny from env=spammer

<Files 403.shtml>
order allow,deny
allow from all
</Files>

Is this sending the denied visitor to my 403 page?

Thanks Ronnie.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#9 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
07-10-2005, 10:06 AM

ErrorDocument 403 /403.shtml
SetEnvIfNoCase Referer .*poker.* spam
Order Allow,Deny
Deny from env=spam

The above would wiork as you want I think.
but you should know,
The earlier examples used mod_rewrite,
this example uses mod_access


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#10 (permalink))
edwurster
green side up, please!
edwurster will become famous soon enoughedwurster will become famous soon enough
 
edwurster's Avatar
 
Status: Offline
Posts: 660
Join Date: May 2003
Location: Voorhees, NJ
Rep Power: 68
07-12-2005, 07:29 AM

Quote:
Originally Posted by midwest
ErrorDocument 403 /403.shtml
SetEnvIfNoCase Referer .*poker.* spam
Order Allow,Deny
Deny from env=spam

The above would wiork as you want I think.
but you should know,
The earlier examples used mod_rewrite,
this example uses mod_access
It will take me a while to understand all of this. Until then, could you explain the purpose of:

<Files 403.shtml>
order allow,deny
allow from all
</Files>

This is what CPANEL put in htaccess when I used CPANEL to edit a 403 error page.


Ed Wurster - sacts92 (old root10)

...CPANEL Docs
......P-Z Server Status
  Send a message via AIM to edwurster  
Reply With Quote
Old
  (#11 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
07-12-2005, 07:42 AM

It is using htaccess to set your 403 error page. In this case your page is in your root.
You could as easily use
<Files index.shtml>
order allow,deny
allow from all
</Files>
to send 403's to your index page.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendarix web-based calendar Jim Misc free php scripts 0 07-22-2007 01:07 PM
eyeOS web based operating system Jim CMS - Content Management Systems 0 07-20-2007 01:18 PM
Beehive Discussion Forum (with frames-based layout) Jim CMS - Content Management Systems 0 07-20-2007 12:56 PM
WAP based e-mail pick up ianharvey General Questions and Comments 1 06-02-2003 10:13 AM
IP Based Account Starseed Web Host Manager 0 04-13-2003 04:41 AM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com