View Single Post
Old 07-11-2008, 05:53 PM   #3 (permalink)
nasty.web
v7n Mentor
 
Join Date: 07-24-06
Posts: 658
iTrader: 1 / 100%
Latest Blog:
None

nasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nicenasty.web is just really nice
Quote:
Originally Posted by homebrewpcgaming View Post
Hello,

Ok, I have a file: downloadzip.php?id=WHATEVERNUMBER

I do not want this file to be hotlinked to (other PHP files are fine), so I only want that one file to be protected.

When someone hotlinks to downloadzip.php?id=WHATEVERNUMBER I want them to be redirected to showgame.php?id=WHATEVERNUMBER

What would I put in .htaccess?

Thank you!
Matthew Kremer
Code:
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?yoursite\.com/ [NC] RewriteCond %{HTTP_REFERER} !^$ RewriteRule downloadzip.php\?id=(\d+)$ showgame.php\?id=$1 [L]
You'll also need to replace yoursite\.com .
nasty.web is offline   Reply With Quote