[Zope] zope and mod_rewrite
maillists@summitmedia.com.ph
maillists@summitmedia.com.ph
Fri, 7 Dec 2001 19:21:06 +0800
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C17F11.439563C0
Content-Type: text/plain;
charset="iso-8859-1"
You gave me an idea. At least now I know what I plan to do may work.
Thank you so much!
fritz <www.mesedilla.com>
systems administrator
summit interactive, inc.
www.fhm.com.ph | www.femalenetwork.com | www.candymag.com
---
+basta ikaw lord
> -----Original Message-----
> From: Phil Harris [mailto:phil.harris@zope.co.uk]
> Sent: Friday, December 07, 2001 06:39 PM
> To: Fritz Mesedilla; Zope Mailing List (E-mail)
> Subject: Re: [Zope] zope and mod_rewrite
>
>
> 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}/VirtualH
> ostBase/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
------_=_NextPart_001_01C17F11.439563C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: [Zope] zope and mod_rewrite</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>You gave me an idea. At least now I know what I plan =
to do may work.</FONT>
<BR><FONT SIZE=3D2>Thank you so much!</FONT>
</P>
<P><FONT SIZE=3D2>fritz <www.mesedilla.com></FONT>
<BR><FONT SIZE=3D2>systems administrator</FONT>
</P>
<P><FONT SIZE=3D2>summit interactive, inc.</FONT>
<BR><FONT SIZE=3D2>www.fhm.com.ph | www.femalenetwork.com | =
www.candymag.com</FONT>
<BR><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>+basta ikaw lord</FONT>
</P>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Phil Harris [<A =
HREF=3D"mailto:phil.harris@zope.co.uk">mailto:phil.harris@zope.co.uk</A>=
]</FONT>
<BR><FONT SIZE=3D2>> Sent: Friday, December 07, 2001 06:39 PM</FONT>
<BR><FONT SIZE=3D2>> To: Fritz Mesedilla; Zope Mailing List =
(E-mail)</FONT>
<BR><FONT SIZE=3D2>> Subject: Re: [Zope] zope and mod_rewrite</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> zope and mod_rewriteFritz,</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> I use the maps for a different purpose (quasi =
load </FONT>
<BR><FONT SIZE=3D2>> balancing), but here's</FONT>
<BR><FONT SIZE=3D2>> what I have that works.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> RewriteEngine On</FONT>
<BR><FONT SIZE=3D2>> RewriteLog d:/rewrite.log</FONT>
<BR><FONT SIZE=3D2>> RewriteLogLevel 9</FONT>
<BR><FONT SIZE=3D2>> RewriteRule ^/kn <A =
HREF=3D"http://some.server.ac.uk:1234/kn/$1" =
TARGET=3D"_blank">http://some.server.ac.uk:1234/kn/$1</A> [P]</FONT>
<BR><FONT SIZE=3D2>> RewriteRule ^/jscomponents - [L]</FONT>
<BR><FONT SIZE=3D2>> RewriteRule ^/chat - [L]</FONT>
<BR><FONT SIZE=3D2>> RewriteRule ^/im - [L]</FONT>
<BR><FONT SIZE=3D2>> RewriteMap servers =
rnd:d:/apache/conf/zeomap.txt</FONT>
<BR><FONT SIZE=3D2>> RewriteRule ^/(.*)</FONT>
<BR><FONT SIZE=3D2>> <A HREF=3D"http://some.server.ac.uk:$" =
TARGET=3D"_blank">http://some.server.ac.uk:$</A>{servers:some.server.ac.=
uk}/VirtualH</FONT>
<BR><FONT SIZE=3D2>> ostBase/http/s</FONT>
<BR><FONT SIZE=3D2>> ome.server.ac.uk:80/VirtualHostRoot/$1 =
[P]</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> and here's the map:</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> some.server.ac.uk 12345|12346</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Simple eh!</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> It doesn't on the face of it seem to be much =
different to </FONT>
<BR><FONT SIZE=3D2>> yours though.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Hope that helps.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Phil</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> ----- Original Message -----</FONT>
<BR><FONT SIZE=3D2>> From: Fritz Mesedilla</FONT>
<BR><FONT SIZE=3D2>> To: Zope Mailing List (E-mail)</FONT>
<BR><FONT SIZE=3D2>> Sent: Friday, December 07, 2001 7:15 AM</FONT>
<BR><FONT SIZE=3D2>> Subject: [Zope] zope and mod_rewrite</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Can someone help me with web switching for zope =
and static pages?</FONT>
<BR><FONT SIZE=3D2>> This is what I hope to achieve:</FONT>
<BR><FONT SIZE=3D2>> 1) Visitor visits <A =
HREF=3D"http://www.maindomain.com/STATIC_PAGE" =
TARGET=3D"_blank">http://www.maindomain.com/STATIC_PAGE</A></FONT>
<BR><FONT SIZE=3D2>> 2) mod_rewrite redirects visitor to </FONT>
<BR><FONT SIZE=3D2><A HREF=3D"http://www.staticdomain.com/STATIC_PAGE" =
TARGET=3D"_blank">http://www.staticdomain.com/STATIC_PAGE</A></FONT>
<BR><FONT SIZE=3D2>1) Visitor visits <A =
HREF=3D"http://www.maindomain.com/ZOPE_PAGE" =
TARGET=3D"_blank">http://www.maindomain.com/ZOPE_PAGE</A></FONT>
<BR><FONT SIZE=3D2>2) mod_rewrite proxxy passes visitor to <A =
HREF=3D"http://www.maindomain.com/ZOPE_PAGE" =
TARGET=3D"_blank">http://www.maindomain.com/ZOPE_PAGE</A></FONT>
<BR><FONT SIZE=3D2>I was able to do this using manual rewriterules. But =
as the static pages</FONT>
<BR><FONT SIZE=3D2>increase, the rules also increase so I plan to use =
rewritemaps.</FONT>
<BR><FONT SIZE=3D2>Here is a sample of what I have done so far. I need =
help with this because</FONT>
<BR><FONT SIZE=3D2>proxy does not work and I need proxy for =
VirtualHostMonster.</FONT>
<BR><FONT SIZE=3D2>Please help me. Thanks.</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>RewriteEngine on</FONT>
<BR><FONT SIZE=3D2>RewriteLog /home/folder/rewrite.log</FONT>
<BR><FONT SIZE=3D2>RewriteLogLevel 2</FONT>
<BR><FONT SIZE=3D2>RewriteMap lowercase =
int:tolower</FONT>
<BR><FONT SIZE=3D2># define the map file</FONT>
<BR><FONT SIZE=3D2>RewriteMap =
folders txt:/home/folder/rule.maps</FONT>
<BR><FONT SIZE=3D2># this does the file-based remap</FONT>
<BR><FONT SIZE=3D2>RewriteRule ^/([^/]+)/?(.*)</FONT>
<BR><FONT SIZE=3D2>${folders:$1|<A =
HREF=3D"http://www.zopedomain.com:8080/VirtualHostBase/http/www.maindom"=
=
TARGET=3D"_blank">http://www.zopedomain.com:8080/VirtualHostBase/http/ww=
w.maindom</A></FONT>
<BR><FONT SIZE=3D2>ain.com.ph:80/zopefolder/VirtualHostRoot/$1} =
[P,L]</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>fritz <www.mesedilla.com></FONT>
<BR><FONT SIZE=3D2>systems administrator</FONT>
<BR><FONT SIZE=3D2>summit interactive, inc.</FONT>
<BR><FONT SIZE=3D2>www.fhm.com.ph | www.femalenetwork.com | =
www.candymag.com</FONT>
<BR><FONT SIZE=3D2>---</FONT>
<BR><FONT SIZE=3D2>+basta ikaw lord</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C17F11.439563C0--