[Zope] Help with RewriteRule?
Richard Barrett
R.Barrett@ftel.co.uk
Wed, 06 Mar 2002 11:36:32 +0000
At 18:19 05/03/2002 -0300, Sidnei da Silva wrote:
>Only change the #1 at the end to $1, and in addiction, you could change [P]
>to [P,L] if you have other rewrite rules. The L says that this is the last
>processed rule if the first part matches.
Using [P,L] instead of [P] will not hurt but the L is redundant. The P
immediately forces the substituted URL through the proxy module without
processing any more rewrite rules.
You might be better off matching to to ^/marketplace/(.*) instead of
^/marketplace(.*). Avoids collisions with /marketplaceandstuff.html,
/marketplace2/..., etc
You could also do this with a ProxyPass of the following form if you have
mod_proxy installed in your Apache:
ProxyPass ^/marketplace/
http://www.myvirtualhost.com:8080/VirtualHostBase/http/www.myvirtualhost.com:80/Marketplace/VirtualHostRoot/
ProxyPassReverse ^/marketplace/ http://www.myvirtualhost.com:8080/Marketplace/
>Em Ter 05 Mar 2002 14:36, addyd@unk.edu escreveu:
> > I'm not very comfortable with RewriteRules and can't find my exact set of
> > circumstances described anywhere.
> > I'm working mainly with the Quickie Apache + Zope setup using VHM found at:
> > http://www.zope.org/Members/Jace/apache-vhm
> > and Chapter 10 of the at:
> > http://www.zopeonarope.com/ch8-10available
> > (thanks Steve!)
> > Would someone please help me with the RewriteRules(s) I need for the
> > following:
> >
> > The linux server I have installed Zope (2.3.3) on has Apache running all
> > static content with LOTS of virtual hosts.
> > I need Zope content for only ONE of the virtual hosts
> > (www.myvirtualhost.com)
> > and I would like Zope proxied only if "/marketplace" is the first directory
> > in the path.
> > (www.myvirtualhost.com/marketplace should return the index_html object in
> > Zope's /Marketplace folder).
> > All other URLs for www.myvirtualhost.com should still be static content
> > from apache.
> >
> > I have installed a Virtual Host Monster in the Zope root.
> >
> > I believe that it should look like the following (all on one line):
> >
> > RewriteRule ^/marketplace(.*)
> > http://www.myvirtualhost.com:8080/VirtualHostBase/http/www.myvirtualhost.co
> >m:80/Marketplace/VirtualHostRoot/#1
> >
> > [P]
> >
> > Is that correct?
> > Do I need another rule to get all other content passed straight through, or
> > will it only rewrite URLs that match the one above? If I need another rule,
> > I need some more help.
> >
> > : \
> >
> > Thanks in advance for any assistance.
> >
> > Darren Addy
> > Web Specialist
> > Information Technology Services
> > University of Nebraska at Kearney
> >
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://lists.zope.org/mailman/listinfo/zope-announce
> > http://lists.zope.org/mailman/listinfo/zope-dev )
>
>--
>Sidnei da Silva
>X3ng Web Technology
>sidnei@x3ng.com.br
>
>_______________________________________________
>Zope maillist - Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>** No cross posts or HTML encoding! **
>(Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )