.htaccess help

RossMAN

Grand Nagus
Feb 24, 2000
79,103
462
136
I used an .htaccess generator with the following info:

Here is the file in question
http://www.costhost.com/conan_xmas_caroling.avi

I only want forums.anandtech.com refers to be able to download that file
everyone else should be redirected to forums.gottadeal.com

urls to allow to hotlink: http:/forums.anandtech.com/

blank referrers

If you have music files etc which are not accessed from a webpage, you will more than likely find there is no referrer information sent. You can set this code to block blank referrers. Bear in mind that some browsers don't carry referrer information, so this may stop a legitimate viewing of your files from your own pages. Only choose this option if this is something that you find you need.

I have tried this checked and unchecked

url to redirect to (if desired): http://forums.gottadeal.com

files to block
Seperate with spaces. No 'dots' needed.
Remember...if blocking jpg files, include jpeg.
Add as many file types as you wish.

Entered both avi and left it blank

I also tried variations 1, 2, 3 and 4.

No luck.

What gives?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
With the htaccess file you created, anyone can download the file no matter the referrer?

EDIT: Can you attach the output from the generator? I'm wondering if those initial "www\." are killing the match...

This is what it gave me:
 

RossMAN

Grand Nagus
Feb 24, 2000
79,103
462
136
I just tried that code, it seems to work now.

How did you figure it out?
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Sweet. I'm not a big fan of mod_rewrite. It's a PITA. I heard at least one major etailer has a _team_ of people on staff just to handle the rewrite rules. :Q