Author |
Message |
Trubador
Regular


Joined: Dec 28, 2004
Posts: 94
|
Posted:
Wed Oct 12, 2005 11:42 am |
|
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 |
|
|
|
 |
CurtisH
Life Cycles Becoming CPU Cycles

Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI
|
Posted:
Wed Oct 12, 2005 11:54 am |
|
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 |
|
|
 |
Trubador

|
Posted:
Wed Oct 12, 2005 12:26 pm |
|
This is what I thought m8...... No dice there though
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
Any ideas on editing the .htaccess directly?
Cheers
Trub |
|
|
|
 |
CurtisH

|
Posted:
Wed Oct 12, 2005 12:45 pm |
|
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

|
Posted:
Wed Oct 12, 2005 2:30 pm |
|
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 ######
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 any help appreciated
Trub |
|
|
|
 |
Trubador

|
Posted:
Wed Oct 12, 2005 4:27 pm |
|
The way I'm now thinking is adding something in the header. Please bear with me my php is awful.... errrr non-existant
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
|
Posted:
Wed Oct 12, 2005 5:26 pm |
|
Something like this should work in .htaccessCode:RewriteCond %{HTTP_REFERER} ^http://(www\.)?org\.uk [NC]
RewriteRule ^.*$ http://127.0.0.1 [R=301,L]
|
|
|
|
|
 |
VinDSL
Life Cycles Becoming CPU Cycles

Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com
|
Posted:
Thu Oct 13, 2005 4:23 am |
|
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...
Proof-of-concept? I'll block Raven PHP Scripts for 24 hours. Go ahead and click on http://www.lenon.com (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!" ::.
.:: Only registered users can see links on this board! Get registered or login! | Only registered users can see links on this board! Get registered or login! ::. |
|
 |
 |
Steptoe
Involved


Joined: Oct 09, 2004
Posts: 293
|
Posted:
Thu Oct 13, 2005 5:27 am |
|
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
http://www.stupidity.com/us/ustc.htm
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 |
|
|
 |
Trubador

|
Posted:
Thu Oct 13, 2005 10:15 am |
|
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 .... 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!!!!
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 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
So, thanks everyone for posting exactly what I wanted in the first place. Just a 'User Interface Error'
Now for the Kicker Is there anything I can do to this ("CORRECT" ) .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

|
Posted:
Thu Oct 13, 2005 4:16 pm |
|
Trubador wrote: | Now for the Kicker Is there anything I can do to this ("CORRECT" ) .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... Only registered users can see links on this board! Get registered or login! |
|
|
|
 |
Trubador

|
Posted:
Thu Oct 13, 2005 4:59 pm |
|
Nah m8..... I can seeeee yoooooooo *** 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
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 I think it went in to continuous loop 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
TTFN
Trub |
|
|
|
 |
|