httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Lopez <dan...@rawbyte.com>
Subject Re: Redirecting request for images
Date Wed, 13 Mar 2002 05:49:46 GMT

Try the following:

RewriteEngine on
RewriteRule ^/images/(.*) /images/${REMOTE_USER}/$1

On Tue, Mar 12, 2002 at 09:53:20PM -0700, Travis Valentine wrote:
> Apache Masters,
> 
> I have searched around, but cannot find the answer I need. (Due to the fact
> I am not sure what I am looking for!!)  Perhaps someone here can help.
> 
> I am setting up a development server several people are going to use to edit
> and change a existing block of html code.  Each person needs a personal copy
> of the code and images so that the changes they make will not affect any
> other users code, including images.  For simplicity, I have created each
> user a directory under /var/www/html/users/ on a RedHat Linux 7.2 box.  I
> have set the Document root for Apache at /var/www/html/users/.  I then place
> a copy of the code in each directory for users to access. (All users are
> internal to the company and accessing the code via Samba, so where it is on
> the box is not an issue.)
> 
> The problem is that the existing html code all references images with a
> preceding / so that the pages expect the images to come from
> /var/www/html/users/images (i.e. going back to the Document root), as
> opposed to /var/www/html/users/jgordon/images (or whatever).  It would be
> extremely difficult (hundreds of pages) to go back and fix it just to work
> in the development environment.
> 
> In any case, I was wondering if there was a way to tell apache to send
> images back from the correct users directory.  A type of redirect, etc.
> Sorry I am being so vague, but I am not sure what the right path to go down
> is.  I am open to any ideas including changing the file structure.  Any
> ideas on getting everyone their own copy?
> 
> Thanks for the help.
> 
> Travis
> 
> P.S.  I also want to know if anyone can show me how to run Apache as root.
> lol :)
> 
> 
> ---------------------------------------------------------------------
> 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
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message