[Linux-disciples] URL rewriting weirdness

Stephen R Laniel steve at laniels.org
Tue Feb 1 13:34:34 EST 2005


On Tue, Feb 01, 2005 at 01:26:48PM -0500, Adam Rosi-Kessel wrote:
> (1) You can't put http:// in a RewriteRule if you don't want
> redirection; otherwise it will redirect to the new location because it
> looks like an external URL (obviously mod_rewrite cannot rewrite to URLs
> not stored on the server). There is supposed to be a feature that
> detects when the host specified is actually the local host, but
> apparently it's not doing that for you, maybe because you are not using
> the canonical hostname for your server.

Just to be sure, I checked just now that the ServerName in
Apache is the same as the hostname I'm using when I visit
it. Indeed, they're the same.

> (2) To do this with Zope, you need the Virtual Host Monster installed in
> your root Zope folder.

Yep, I knew that. (This page is very helpful on that score:
http://shorl.com/dyhibatogrutu )

> (3) You need to use the [P] flag with RewriteRule to pass the URL to
> mod_proxy, e.g.:
> 
> RewriteRule ^zope_site/*(.*) \
> http://shorl.com/jejedromabrepru [P]

You know me very well, sir Adam; Zope is precisely what I'm
using here. I don't anything about mod_proxy, though;
perhaps I ought to, in order to figure out what's going on?

When I visit hostname:9673/stuff, the URL gets rewritten to
the very nasty VirtualHostMonster URL of which you gave a
good example. That's precisely the problem I'm trying to
fix.

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050201/6ffe3b65/attachment.pgp


More information about the Linux-disciples mailing list