Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)
Author Message
Trubador
Regular
Regular



Joined: Dec 28, 2004
Posts: 94

PostPosted: Wed Oct 12, 2005 11:42 am Reply with quote

A weird question but I need help here.

I'm not to savvy with referers or sentinal, or whether this is the correct path.

Here's the situation.

I'm currently looking in to legal action against another website with duff information about my own website..... copyright issues and a few other things..... its a long story and a petty one at that.

What I'm interested in doing is if someone clicks on a link to my site from a page on this other site, is it possible to redirect to a default page?

I've tried editing .htaccess but still cant seem to get anything to work.

Cheers all

Trub
 
View user's profile Send private message
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Wed Oct 12, 2005 11:54 am Reply with quote

In Sentinel => Blocker Configuration => Referrer Blocker Settings you can add the domain that is linking you and then select the method of dealing with the referrer. I would suggest selecting the "Email, Block, Default Page" option which will email you when someone attempts access to your site via the offending site, block them and redirect them to the "bad referrer" page.

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
Trubador







PostPosted: Wed Oct 12, 2005 12:26 pm Reply with quote

This is what I thought m8...... No dice there though Sad

lets just say the site is XXX.org.uk

I should just add XXX.org.uk to the blocked referer settings?

This doesnt seem to work Sad

Any ideas on editing the .htaccess directly?

Cheers

Trub
 
CurtisH







PostPosted: Wed Oct 12, 2005 12:45 pm Reply with quote

In a situation like that I would normally block the following:

xxx.org.uk
org.uk

That always works for me.

Oops, I missed this:

Quote:
Any ideas on editing the .htaccess directly?


Unfortunately, no... Sorry
 
Trubador







PostPosted: Wed Oct 12, 2005 2:30 pm Reply with quote

Can anyone else help with this?

I basically need to deny all clickthroughs/weblinks from say XXX.org.uk

I currently have parts of this in my .htaccess at the beginning. Edited out bits Wink ######

Code:
RewriteEngine on 

RewriteCond ######
RewriteCond #####
RewriteRule ###########[R=301,L]


I've tried all sorts and I'm having probs......... Is there any php code I could possibly apply to index or header.php?

At a loose end and clutching straws Sad any help appreciated Smile

Trub
 
Trubador







PostPosted: Wed Oct 12, 2005 4:27 pm Reply with quote

The way I'm now thinking is adding something in the header. Please bear with me my php is awful.... errrr non-existant Smile


Code:
if $HTTP_REFERER = XXX.org.uk

then
redirect to blahblahblahGetYourOwnLinks.html


Can anyone progress on this?

Trub
 
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Wed Oct 12, 2005 5:26 pm Reply with quote

Something like this should work in .htaccess
Code:
RewriteCond %{HTTP_REFERER} ^http://(www\.)?org\.uk [NC]

RewriteRule ^.*$ http://127.0.0.1                                [R=301,L]
 
View user's profile Send private message
VinDSL
Life Cycles Becoming CPU Cycles



Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Thu Oct 13, 2005 4:23 am Reply with quote

Trubador wrote:
lets just say the site is XXX.org.uk

I block bad referers all the time. It's sort of a hobby of mine. I actually enjoy it -- do it for fun -- to relax. I blocked about 10 referer spammers before I came over here tonight...

Here's how I would handle that referer...

Code:
RewriteCond %{HTTP_REFERER} (XXX.org.uk)                                [NC]

RewriteRule ^(.*) %{HTTP_REFERER}                                           [R=301,L]

When someone at XXX.org.uk clicks on a link to your page, all it does is refresh the page at XXX.org.uk... Wink

Proof-of-concept? I'll block Raven PHP Scripts for 24 hours. Go ahead and click on [ Only registered users can see links on this board! Get registered or login! ] (my production site) and see what it does.

Here's the script I used...

Code:
RewriteCond %{HTTP_REFERER} (ravenphpscripts.com)                   [NC]

RewriteRule ^(.*) %{HTTP_REFERER}                                           [R=301,L]

Simple pimple, huh?

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: VinDSL's Lenon.com | The Disipal Site ::. 
View user's profile Send private message Visit poster's website ICQ Number
Steptoe
Involved
Involved



Joined: Oct 09, 2004
Posts: 293

PostPosted: Thu Oct 13, 2005 5:27 am Reply with quote

Hey thats cool going to add that to my "notes" folder
So what would the code be if instead u sent them to another site..say like this one [ Only registered users can see links on this board! Get registered or login! ]
Oh that is a serious study, well worth wading thru.

Quote:

RewriteCond %{HTTP_REFERER} (http://www.stupidity.com/us/ustc.htm) [NC]
RewriteRule ^(.*) %{HTTP_REFERER} [R=301,L]

_________________
My Spelling is NOT incorrect, it's Creative 
View user's profile Send private message
Trubador







PostPosted: Thu Oct 13, 2005 10:15 am Reply with quote

Oh........ my.......... god............

Thanks all for your time on helping me with this little prob...........

These are the exact codes I've placed and tested in my htaccess. I battered my head for about twelve hours on this and couldnt understand the problem on why anything didnt work.

Vin.... thanks for blocking ravens m8. Thats what my problem was. Errrrrrr sort of Smile .... your link didnt work!!!!!! How could this be I asked myself? An experienced coder getting this simple script wrong? NOT A CHANCE m8..... you were spot on!!!! Smile

So I was just discribing to the wife what the script does...... blah blah blah... Headers...... blah blah redirect HEADERS info.... blah.......

Then it hit me Smile FULL ON...... I remembered the problem ages ago with output headers already sent with firefox and Nortons bloody firewall.

Yes.... NORTONS BLOODY FIREWALL!!!!!!

It does something with the headers. Guess what, enable it and I can still access your site from that link m8, disable and it just refreshes ravens page in a new window as its supposed to do Smile

So, thanks everyone for posting exactly what I wanted in the first place. Just a 'User Interface Error' Smile

Now for the Kicker Smile Is there anything I can do to this ("CORRECT" Smile ) .htaccess script so that firewalls, like nortons, will work with it?

I'll have another net search myself to try and find something, but if anyone has any ideas I'd be happy to test them.

All the best and thanks all again for posting

Trub

P.s. Just for any search engines -

Code:
Norton, Nortons, Security, Firewall, referer, RewriteCond %{HTTP_REFERER} = A BLOODY HEADACHE
 
VinDSL







PostPosted: Thu Oct 13, 2005 4:16 pm Reply with quote

Trubador wrote:
Now for the Kicker Smile Is there anything I can do to this ("CORRECT" Smile ) .htaccess script so that firewalls, like nortons, will work with it?

I don't use Norton, so I cannot see what it's doing in the background. I use ZoneAlarm for my firewall. However, I do use Firefox.

Hrm...

I use this next script for *nasty* referers -- ones the other script won't catch -- like referers with spaces in the URI, et cetera. You might try it.

Here's how I'm blocking Raven PHP Scripts now (temporarily)...


Code:
SetEnvIfNoCase Referer "^http://www.ravenphpscripts.com" bad_ref=yes    [NC,OR]

SetEnvIfNoCase Referer "^http://ravenphpscripts.com" bad_ref=yes          [NC]
RewriteCond %{ENV:bad_ref} ^yes$
RewriteCond %{HTTP_REFERER} ^(.*)$
RewriteRule ^(.*)$ %1                                                                         [R=301,L]

See if that works... http://www.lenon.com
 
Trubador







PostPosted: Thu Oct 13, 2005 4:59 pm Reply with quote

Nah m8..... I can seeeee yoooooooo Shocked *** Edit - Only with Nortons Enabled ***

I've just done some invest.

It turns out Nortons is not the only Firewall that strips the HTTP_REFERER

Just out of my own interest. In Zone Alarm check "Remove Private Header Info" in "Privacy - 3rd Party Cookies" to see if this has any affect on your link.

A quote from PunBB.org Forums that also see's its not only Nortons problems with HTTP_REFERER also Kerio.

Quote:
You are browsing the forum through a proxy or firewall of some sort that is stripping HTTP_REFERER from all requests. Norton Personal Firewall and Kerio Personal Firewall 4 are the only ones I know of so far that strip HTTP_REFERER by default. Popup/ad stoppers are also known to do this in some cases (most of them don't though). See this post for info on how to setup Norton to circumvent the problem with Norton.


The only way to circumvent Norton from stripping the referer is only in Nortons itself from the users PC, which we can not do as Admins - it would also defeat the object of a Firewall Smile

The only other way I can see at the moment would be to find another script for .htaccess or look at php $_SESSION and/or $_SERVER['REQUEST_URI']; scripts......

(Trub gets a sinking feeling as he jumps well out of his depth in to the deep end)

I also believe another way of course to circumvent HTTP_REFERER would be to use a proxy.

Please bear with me here m8. I've only just started looking at .htaccess in any way or form.

The code yourself and Raven have given me though works a bloody treat. I've even managed to re-direct to another page.... That took a while as well, I first linked to a html file on my server that was redirecting. I dont think I'll even bother looking at my error log of the next few days Smile I think it went in to continuous loop Embarassed So I just used my own ISP webspace....

If anyone else reading this has Nortons then the way to see this working would be to go to "Privacy Control" - "Configure" - "Custom Level" and uncheck "Enable Browser Privacy". Or just disable the thing.

Anyway a bit of food for thought. The good thing is the script will still stop spam bots very effectively Smile

TTFN

Trub
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm)

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©