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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.