Re: Maintaing the URL when Rewriting

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

 



On 7/12/07, Naveen Sharma <mailatnaveen@xxxxxxxxx> wrote:
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

This changes the URl to
http://dev.expedia.jp/action.do?city=hawaii

Please suggest as to how this URL can be preserve while internally hiting an
action.

Leave the http and hostname out of the RewriteRule:

RewriteRule ^/([a-zA-Z]*)(-)(hotels)/ /action?city=$1

Martijn.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[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