httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <>
Subject Re: [users@httpd] .htaccess help - it's blocking my own images
Date Sat, 14 Aug 2004 03:51:49 GMT
On Fri, 13 Aug 2004 22:49:42 -0400,
<> wrote:
> Can someone  translate what that particular .htaccess code means in English? Everyone
else seems to know but I don't.

> RewriteCond %{HTTP_REFERER} !^$

If the browser's referer header (which tells Apache what page linked
to the current file) isn't empty...

> RewriteCond %{HTTP_REFERER} !^http://(www\.)?*$ [NC]

And it doesn't match that pattern...

> RewriteRule \.(gif|jpg)$ - [F]

And the filename ends in either .gif or .jpg, then return a 403 Forbidden error.

Check your access logs to see what the referer header looks like on
requests to index.html, and make sure it matches the pattern in the
second RewriteCond.

> And only one page is, index.html, is being messed up, not all requests.

Are requests to "" messed up,
or just requests to ""?

> How exactly do I add in an [OR[ flag.

Ignore that--it was a bad piece of advice.

Brent 'Dax' Royal-Gordon <>
Perl and Parrot hacker

There is no cabal.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message