Forum Moderators: phranque
I have this SSI as an include file on my Rate a Page.
Essentially the idea is that if you didn't get there via one of the pages on the two sites you should then be referred to deny.htm
[SSI Code}
<!--#set var="AB" value="http://www.example[1].com/" -->
<!--#set var="CD" value="http://www.example[2].com/" -->
<!--#if expr="${HTTP_REFERER} =ET" -->
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=#start">
<!--#elif expr="${HTTP_REFERER} =VK" -->
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=#start">
<!--#else -->
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=http://www.example.com/denied.htm">
<!--#endif -->
[/SSI Code]
The first two lines weren't strictly necessary but however. From within the sites you actually are sent to the anchor link #start.
If I simply paste the rate-page URL into my browser, you should be sent to denied.htm and this simply doesn't happen.
The idea is to stop spammers using my URL to post the usual links and, before anyone suggests any other remedy I've just about exhausted them all.
Thanks!
Jim
Ian;Using Firefox 2 I end up at
http://www.example.com/denied.htm
when I click on
http://www.example.com/rate-page.htm
But in IE6 & 7 I go nowhere!
Opera 9 goes into refresh mode but just keeps forever reloading the same URL while Netscape 7, as you would expect, does the right thing and behaves the same as FireFox and goes to the denied page.
So, somehow the code is not liked by IE or Opera, interesting!
I'll do a search and see what I can find out.
You might consider using a modified version of the common anti-hotlinking .htaccess code (commonly used for image protection, but easily-adaptable to this situation) to avoid the SSI/meta-refresh method altogether...
Jim