httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Watts <>
Subject Re: [users@httpd] Maintaing the URL when Rewriting
Date Thu, 12 Jul 2007 14:06:22 GMT

> Hi Scott,
> I want the URL to be visible as
> http://dev.home.en/hawaii-hotels but internally it should use
> http://dev.home.en/action?city=hawaii.
> I have used this
> RewriteEngine On
>  RewriteRule ^/([a-zA-Z]*)(-)(hotels)/ http://%{HTTP_HOST}/action?city=$1

Rewriting to an external host (which is what an http:// URL is) forces an 
implicit redirect.

The originally suggested RewriteRule did not use http://%{HTTP_HOST} for this 


Mark Watts BSc RHCE MBCS
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services Group
GPG Key:

View raw message