[Linux-disciples] URL rewriting weirdness

Stephen R Laniel steve at laniels.org
Tue Feb 1 12:11:15 EST 2005


I'm trying to use mod_rewrite to get requests of the form

hostname/path

to map to

hostname:9673/aMuchLongerPath

I used

RewriteRule hostname/path http://hostname:9673/aMuchLongerPath

and got a bit more than I wanted: the redirection works, but
the URL in the location bar actually gets rewritten to the
longer, uglier URL. I suspect that's because I included the
'http://' in the substitution part, but I couldn't think of
any way around that, if I'm also going to include the
port-9673 part. Normally I thought the location bar only got
rewritten if you used the [R] flag.

I'm sure this is an easy question. Any takers?

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/


More information about the Linux-disciples mailing list