Re: Help with apache mod_rewrite

Top Page
Attachments:
Message as email
+ (text/plain)
+ signature.asc (application/pgp-signature)
+ (text/plain)
Delete this message
Reply to this message
Author: Alex Dean
Date:  
To: Main PLUG discussion list
Subject: Re: Help with apache mod_rewrite
Will this work for you?

<VirtualHost>
Redirect /dir1/dir2 /other_dir
</VirtualHost>

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect

Bryan O'Neal wrote:
> I can not get this working through Tomcat with Apache2. It looks like I
> am going to have to write a servlet filter for this; or rather, my
> developer will.
>
> -----Original Message-----
> From:
> [mailto:plug-discuss-bounces@lists.plug.phoenix.az.us] On Behalf Of
> Bryan O'Neal
> Sent: Wednesday, August 20, 2008 1:09 AM
> To: Arizona State University Linux Users Group; Main PLUG discussion
> list
> Subject: RE: Help with apache mod_rewrite
>
> Ok, I lied the whole thing is mute because I can not get anything work
> with tomcat.
>
> Here is the full deal, I have my developers working on there projects
> with all the images being stored under /AppDir/Images/Page/image1.jpg
> and with our set up of apache forwarding the request through an
> encrypted ajp tunnel to tomcat that then forwards the image to apache,
> which then delivers it to the user, it is just a bit slow and there is
> no need for it. What I want to do is rewrite it so instead of going to
> /AppDir/Images/Page/image1.jpg on my tomcat server it just goes to
> /Images/Page/image1.jpg on my apache server. Any suggestions?
>
> -----Original Message-----
>
> For reasons I don't want to go into, I need to rewrite all references to
> /dir1/dir2/ to /other_dir/ so that /dir1/dir2/file.ext goes to
> /other_dir/file.ext and /dir1/dir2/dir3/file.ext goes to
> /other_dir/dir3/file.ext and dir1/dir2/dir3/dir4/file.ext goes to
> /other_dir/dir3/dir4/file.ext, etc.
>
> I can rewrite /dir1/dir2/file.ext to /other_dir/file.ext no problem with
> RewriteRule ^/dir1/dir2/(.*) /other_dir/$1 however I can not seem to get
> it to preserve directories. I do not mind writing additional rules to
> escape the directories like RewriteRule ^/test/([^/\.]+)/(.*)
> /other_dir/$1/$2 but that does not seem to work. Any suggestions?
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>



---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss