[Zope] zope and mod_rewrite

Phil Harris phil.harris@zope.co.uk
Fri, 7 Dec 2001 10:39:29 -0000


zope and mod_rewriteFritz,

I use the maps for a different purpose (quasi load balancing), but here's
what I have that works.

RewriteEngine On
RewriteLog d:/rewrite.log
RewriteLogLevel 9
RewriteRule ^/kn http://some.server.ac.uk:1234/kn/$1 [P]
RewriteRule ^/jscomponents - [L]
RewriteRule ^/chat - [L]
RewriteRule ^/im - [L]
RewriteMap servers rnd:d:/apache/conf/zeomap.txt
RewriteRule ^/(.*)
http://some.server.ac.uk:${servers:some.server.ac.uk}/VirtualHostBase/http/s
ome.server.ac.uk:80/VirtualHostRoot/$1 [P]


and here's the map:

some.server.ac.uk 12345|12346


Simple eh!

It doesn't on the face of it seem to be much different to yours though.

Hope that helps.

Phil


----- Original Message -----
From: Fritz Mesedilla
To: Zope Mailing List (E-mail)
Sent: Friday, December 07, 2001 7:15 AM
Subject: [Zope] zope and mod_rewrite




Can someone help me with web switching for zope and static pages?
This is what I hope to achieve:
1) Visitor visits http://www.maindomain.com/STATIC_PAGE
2) mod_rewrite redirects visitor to http://www.staticdomain.com/STATIC_PAGE
1) Visitor visits http://www.maindomain.com/ZOPE_PAGE
2) mod_rewrite proxxy passes visitor to http://www.maindomain.com/ZOPE_PAGE
I was able to do this using manual rewriterules. But as the static pages
increase, the rules also increase so I plan to use rewritemaps.
Here is a sample of what I have done so far. I need help with this because
proxy does not work and I need proxy for VirtualHostMonster.
Please help me. Thanks.


RewriteEngine on
RewriteLog /home/folder/rewrite.log
RewriteLogLevel 2
RewriteMap   lowercase  int:tolower
# define the map file
RewriteMap   folders      txt:/home/folder/rule.maps
# this does the file-based remap
RewriteRule  ^/([^/]+)/?(.*)
${folders:$1|http://www.zopedomain.com:8080/VirtualHostBase/http/www.maindom
ain.com.ph:80/zopefolder/VirtualHostRoot/$1} [P,L]


fritz <www.mesedilla.com>
systems administrator
summit interactive, inc.
www.fhm.com.ph | www.femalenetwork.com | www.candymag.com
---
+basta ikaw lord