Re: Maintaing the URL when Rewriting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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 
reason.

Mark.

-- 
Mark Watts BSc RHCE MBCS
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services Group
GPG Key: http://keyserver.veridis.com:11371/search?q=0x455420ED

Attachment: pgpMdykOaWNnN.pgp
Description: PGP signature


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux