|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I have this little bit of code in the .htaccess file in my /img directory on my
website, the purpose of which is to keep people from hotlinking onto any GIF
files (btw we're talking about Apache):
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://mydomainname.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.mydomainname.com/.*$ [NC]
RewriteRule .*\.gif$ - [G]
I would like to add the capability to prevent JPG or PNG hotlinking as well.
Anyone know how to do that? Do I copy everything from the first RewriteCond
thru the [G], and just supply the new file type instead of .gif? Any help
would be appreciated. Thanks :)
--
Dan
GoofyGraffix.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dan Byers wrote:
> I have this little bit of code in the .htaccess file in my /img directory on my
> website, the purpose of which is to keep people from hotlinking onto any GIF
> files (btw we're talking about Apache):
>
> RewriteEngine on
> RewriteCond %{HTTP_REFERER} !^$
> RewriteCond %{HTTP_REFERER} !^http://mydomainname.com/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^http://www.mydomainname.com/.*$ [NC]
> RewriteRule .*\.gif$ - [G]
>
> I would like to add the capability to prevent JPG or PNG hotlinking as well.
> Anyone know how to do that? Do I copy everything from the first RewriteCond
> thru the [G], and just supply the new file type instead of .gif? Any help
> would be appreciated. Thanks :)
>
> --
> Dan
> GoofyGraffix.com
>
>
>
Try:
RewriteRule .*\.(gif|jpg|png)$ - [G]
(Disclaimer: I'm by no means an expert on MOD_REWRITE, if you webserver
acts strangely after the suggested changes, don't blame me, you changed
your file.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Mike Raiford <mra### [at] hotmailcom> wrote:
> Try:
>
> RewriteRule .*\.(gif|jpg|png)$ - [G]
>
I'll give it a try -- thanks.
--
Dan
GoofyGraffix.com
Post a reply to this message
|
|
| |
| |
|
|
From: Nicolas Alvarez
Subject: Re: Question about an .htaccess file
Date: 29 Jan 2008 13:31:59
Message: <479f711f@news.povray.org>
|
|
|
| |
| |
|
|
.htaccess is bad for performance. It should only be used in shared hosts
and the like. If you have full access to the server configuration
(httpd.conf), set it so that it doesn't even try reading .htaccess
files, and put your config in <Directory> tags on your httpd.conf.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> .htaccess is bad for performance. It should only be used in shared hosts
It's a shared host.
--
Dan
GoofyGraffix.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Nicolas Alvarez <nic### [at] gmailisthebestcom> wrote:
> .htaccess is bad for performance.
So it takes 0.1 seconds instead of 0.01 seconds to evaluate for the
maximum 1 hit per minute he probably gets? Big deal?
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Warp <war### [at] tagpovrayorg> wrote:
> So it takes 0.1 seconds instead of 0.01 seconds to evaluate for the
> maximum 1 hit per minute he probably gets? Big deal?
>
> --
> - Warp
I'm getting one hit per minute?????? Holy crud, my traffic is spiking through
the roof!!! My advertising dollars are finally paying off ;)
--
Dan
GoofyGraffix.com
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dan Byers wrote:
> I'm getting one hit per minute?????? Holy crud, my traffic is spiking through
> the roof!!! My advertising dollars are finally paying off ;)
I'll have whatever he's having...
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Dan Byers <goofygraffix_at_geemail_dot_com> wrote:
> > So it takes 0.1 seconds instead of 0.01 seconds to evaluate for the
> > maximum 1 hit per minute he probably gets? Big deal?
> I'm getting one hit per minute?????? Holy crud, my traffic is spiking through
> the roof!!! My advertising dollars are finally paying off ;)
Well, I said "maximum". :P
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |