Jump to content


This topic is now archived and is closed to further replies.


Not completely PHP, but..

Recommended Posts

Right, I have made a nice file protection system for my website

Because of all the problems with WMA (headers not being sent when using EMBED tag) Ive used the following htaccess code to prevent hotlinking

[code]RewriteEngine on
RewriteCond %{HTTP_COOKIE} !^.*access=granted.*$
RewriteRule .*[Ww][Mm][Aa]$|.*[Tt][Ii][Tt]$[/code]

Basically this is saying, if they dont have a cookie set called [b]access[/b] which is equal to [b]granted[/b] then lets take them to a hotlink page

This is working great !! in IE

[b]But not firefox !!! [/b]

Its really wierd, because to test ive echoed the cookie out and it displays fine in with IE and Firefox. But, the system doesnt work in firfox

For some reason .htaccess doesnt appear to be able to read the cookie

Im just wondering if anyone has any ideas why?

$reqqq = $_SERVER['HTTP_HOST'];;
setcookie("access", "granted", "0", "/", $reqqq);

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.