Question about .htacces

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

i have a little problem with an .htacces file.

The conten ist the following:

RewriteEngine on

RewriteCond % !^$

RewriteCond % !^http://(www\.)?deineHomepage\.de(/.*)?$ [NC]

RewriteRule \.(rar|zip)$


This Script helps protect links / files on webspace. If maybe
links to an *.rar or *.zip file on my Webspace the user who wanted to
download this file is getting a message that he is not allowed to download,
because he didn't click  a link to this file on my webpage.....

Now there is a little problem. If the User makes right click and is coping
the link and paste it into a new Browser Tab, the he is able to Downlaod my

I think, it's because there is no HTTP_REFERER in an new Browser Window. Is
there any wayto change this, maybe if there is no Referer download is't
possible to.


PS: Please appologize my bad english

Re: Question about .htacces

In alt.html  Thomas Wehner said:

Quoted text here. Click to load it

if you're worried about that then i had better not tell you the other
ways the rewrite doesn't work that are worse.
Quoted text here. Click to load it

many people don't even send a referer or its something interesting
totally unrelated to being a referer.

Quoted text here. Click to load it

remove this line:

RewriteCond % !^$


   v      o      i      c      e      s

Re: Question about .htacces

Thomas Wehner wrote:

Quoted text here. Click to load it

Yes, but it's a dumb idea because it will block many legitimate accesses.
(e.g. user goes to your page, clicks on the link and his browser passes
the address to his download manager, which doesn't send a referer header.)

Toby A Inkster BSc (Hons) ARCS
Contact Me  ~

Site Timeline