You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by mr...@comcast.net on 2004/03/30 19:32:54 UTC

[users@httpd] new to apache2, having a modrewrite problem

I've got a setup where we have a machine:

machine.company.com

and we wanted it to resolve to "somesite.org"

On top of that, the site is running Apache2 as a frontend to Zope (running on port 8080), so the latter could serve up a PLone website.

We currently have the following line in our httpd.conf:

<IfModule mod_rewrite.c>
   RewriteEngine On
                                                                                                                                                                                          RewriteRule ^/icons/ - [L]
                                                                                                                                                                                          RewriteRule /manage \
     http://machine.company.com:8080/manage
   RewriteRule ^/(.*) \  http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/testsite/VirtualHostRoot/$1 [L,P]
 </IfModule>                                                                                                                                                                                       

This works perfectly for redirecting all matches to the zope server, but I want to add some exception so if the user goes to www.somesite.org/data, it goes to a Subversion server managed by Apache2, instead of being intercepted by Zope.  Wha t is it that I need to put in to exclude my "data" directory from being rewritten by Apache2/served up by Zope?  Thanks for any help.

---------------------------------------------------------------------
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] new to apache2, having a modrewrite problem

Posted by Joshua Slive <jo...@slive.ca>.
On Tue, 30 Mar 2004 mrmikeylee@comcast.net wrote:
>    RewriteEngine On
> RewriteRule ^/icons/ - [L]
> RewriteRule /manage \
>      http://machine.company.com:8080/manage
>    RewriteRule ^/(.*) \
> http://localhost:8080/VirtualHostBase/http/%{HTTP_HOST}:80/testsite/VirtualHostRoot/$1
> [L,P]

> This works perfectly for redirecting all matches to the zope server, but
> I want to add some exception so if the user goes to
> www.somesite.org/data, it goes to a Subversion server managed by
> Apache2, instead of being intercepted by Zope.  Wha t is it that I need
> to put in to exclude my "data" directory from being rewritten by
> Apache2/served up by Zope?  Thanks for any help.

You can do exactly the same thing you are doing for the /icons/ directory.
(Or you can add a RewriteCond preceeding the relevant RewriteRule; see the
mod_rewrite docs.)

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