httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jos...@slive.ca>
Subject Re: [users@httpd] mod rewrite question..
Date Wed, 03 Dec 2003 20:25:31 GMT

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


Mime
View raw message