You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ac...@aol.com on 2004/08/12 17:01:34 UTC
[users@httpd] .htaccess help - it's blocking my own images
I recently configured my .htaccess file to block hotlinking by putting this inside the file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?thesonicworld.net/.*$ [NC]
RewriteRule \.(gif|jpg)$ - [F]
(of course the third phrase was all on one line)
Anyway it is blocking my own images on one (and only one) of my pages, index.html. (if you go to the site now it won't be because I turned it off) Can someone tell me why it is not reading index.html as part of my website or something? How do I fix this?
-Andrew
---------------------------------------------------------------------
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
Re: [users@httpd] .htaccess help - it's blocking my own images
Posted by Joshua Slive <js...@gmail.com>.
On Thu, 12 Aug 2004 18:04:48 +0300, Eimantas Vaiciunas
<ei...@sc.vu.lt> wrote:
> On Thursday 12 August 2004 18:01, AceZero2790@aol.com wrote:
> > I recently configured my .htaccess file to block hotlinking by putting this
> > inside the file:
> >
> > RewriteEngine on
> > RewriteCond %{HTTP_REFERER} !^$
> > RewriteCond %{HTTP_REFERER} !^http://(www\.)?thesonicworld.net/.*$ [NC]
> > RewriteRule \.(gif|jpg)$ - [F]
> >
> > (of course the third phrase was all on one line)
> >
> > Anyway it is blocking my own images on one (and only one) of my pages,
> > index.html. (if you go to the site now it won't be because I turned it off)
> > Can someone tell me why it is not reading index.html as part of my website
> > or something? How do I fix this?
> Ad [OR] flag after the first RewriteRule
Nope. That will certainly block all requests, since either the first
or the second RewriteCond is always true, therefore the RewriteRule
will apply and block everything.
To figure out what the problem is, you need to look at some log files.
Start with simply looking at the referer in the access log and make
sure it matches your regex. Then use the RewriteLog to see what
mod_rewrite is doing.
Joshua.
---------------------------------------------------------------------
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
Re: [users@httpd] .htaccess help - it's blocking my own images
Posted by Eimantas Vaiciunas <ei...@sc.vu.lt>.
On Thursday 12 August 2004 18:01, AceZero2790@aol.com wrote:
> I recently configured my .htaccess file to block hotlinking by putting this
> inside the file:
>
> RewriteEngine on
> RewriteCond %{HTTP_REFERER} !^$
> RewriteCond %{HTTP_REFERER} !^http://(www\.)?thesonicworld.net/.*$ [NC]
> RewriteRule \.(gif|jpg)$ - [F]
>
> (of course the third phrase was all on one line)
>
> Anyway it is blocking my own images on one (and only one) of my pages,
> index.html. (if you go to the site now it won't be because I turned it off)
> Can someone tell me why it is not reading index.html as part of my website
> or something? How do I fix this?
Ad [OR] flag after the first RewriteRule
-----
Eimis
---------------------------------------------------------------------
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