You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by BOFH <bo...@miserable.com> on 2003/12/03 21:08:51 UTC
[users@httpd] mod rewrite question..
In an effort to curb image linking to my website I have put in the
following in the server wide part of my httpd.conf file:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F]
This works great, however I would like to let a single user link images
from their web directory. How would I go about setting up apache to let
images be linked out of a particular directory structure? I.E.
/home/webdocs/userx
TIA!!
Tom
---------------------------------------------------------------------
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] mod rewrite question..
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 3 Dec 2003, BOFH wrote:
> In an effort to curb image linking to my website I have put in the
> following in the server wide part of my httpd.conf file:
>
> RewriteEngine on
> RewriteCond %{HTTP_REFERER} !^$
> RewriteCond %{HTTP_REFERER} !^http://your_domain.com/.*$ [NC]
> RewriteCond %{HTTP_REFERER} !^http://www.your_domain.com/.*$ [NC]
> RewriteRule .*\.(gif|GIF|jpg|JPG)$ - [F]
>
> This works great, however I would like to let a single user link images
> from their web directory. How would I go about setting up apache to let
> images be linked out of a particular directory structure? I.E.
> /home/webdocs/userx
Add another RewriteCond. I think what you are saying is that you want to
exempt one particular directory from these restrictions. If so, you could
add something like
RewriteCond %{REQUEST_URI} !^/userx
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