Jump to content

Not completely PHP, but..


jaymc

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]$ http://192.168.1.10/hotlink.php[/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?

[code]
$reqqq = $_SERVER['HTTP_HOST'];;
setcookie("access", "granted", "0", "/", $reqqq);
[/code]
Link to comment
https://forums.phpfreaks.com/topic/23914-not-completely-php-but/
Share on other sites

Archived

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

×
×
  • Create New...

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.