[Zope] rewrite, VHM, and base href problem

Tim Wilson wilson@visi.com
Mon, 12 Aug 2002 10:40:21 -0500


Hi everyone,

I'm finally getting around to working on problem that's been bothering
me for a while. I'd like to use a Virtual Host Monster (VHM) and
Apache's mod_rewrite to redict certain URLs to subdirectories of my Zope
site. For example:

http://isd197.org/mendota/

and

http://mendota.isd197.org/

The first one works perfectly. The second, however, works except for the
graphic at the top of the page. Viewing the source of the page reveals
the following:

CTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
 <HEAD>
<base href="http://www.isd197.org/" />

Notice that the base is set to the root of my Zope. As a result, the
image that is supposed to appear at the top of this page is not found.

The relevant section of httpd.conf looks like

<VirtualHost 206.131.108.110>
  ServerName mendota.isd197.org
  DocumentRoot /var/www/district

  RewriteEngine On
  RewriteLog "/var/log/apache/rewrite_log"
  RewriteLogLevel 3
  RewriteRule ^/(.*)
http://127.0.0.1:8080/VirtualHostBase/http/mendota.isd197.org:80/mendota/VirtualHostRoot/$1
[P]
</VirtualHost>

Apache's rewrite log shows this:

134.84.184.23 - - [12/Aug/2002:10:38:29 -0500]
[mendota.isd197.org/sid#80a9954][rid#8095974/initial] (2) init rewrite
engine with requested uri /
134.84.184.23 - - [12/Aug/2002:10:38:29 -0500]
[mendota.isd197.org/sid#80a9954][rid#8095974/initial] (3) applying
pattern '^/(.*)' to uri '/'
134.84.184.23 - - [12/Aug/2002:10:38:29 -0500]
[mendota.isd197.org/sid#80a9954][rid#8095974/initial] (2) rewrite / ->
http://lists.isd197.org:8080/VirtualHostBase/http/mendota.isd197.org:80/mendota/VirtualHostRoot/
134.84.184.23 - - [12/Aug/2002:10:38:29 -0500]
[mendota.isd197.org/sid#80a9954][rid#8095974/initial] (2) forcing
proxy-throughput with
http://lists.isd197.org:8080/VirtualHostBase/http/mendota.isd197.org:80/mendota/VirtualHostRoot/
134.84.184.23 - - [12/Aug/2002:10:38:29 -0500]
[mendota.isd197.org/sid#80a9954][rid#8095974/initial] (1) go-ahead with
proxy request
proxy:http://lists.isd197.org:8080/VirtualHostBase/http/mendota.isd197.org:80/mendota/VirtualHostRoot/
[OK]

Can anyone offer a suggestion?

-Tim

-- 
Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson@visi.com |  <dtml-var pithy_quote>  | http://linux.com