Jump to content


Photo

Not completely PHP, but..


  • Please log in to reply
1 reply to this topic

#1 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 14 October 2006 - 01:48 AM

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

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

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

This is working great !! in IE

But not firefox !!!

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);

I would love to change the world, but they won't give me the source code

SEO Agency

#2 jaymc

jaymc
  • Members
  • PipPipPip
  • Advanced Member
  • 1,521 posts
  • LocationLiverpool

Posted 15 October 2006 - 11:43 PM

Any ideas?
I would love to change the world, but they won't give me the source code

SEO Agency




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users