httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <brent...@gmail.com>
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, acezero2790@aol.com
<acezero2790@aol.com> 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\.)?thesonicworld.net/.*$ [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 "http://www.thesonicworld.net/index.html" messed up,
or just requests to "http://www.thesonicworld.net"?

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

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

-- 
Brent 'Dax' Royal-Gordon <brent@brentdax.com>
Perl and Parrot hacker

There is no cabal.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message