RedirectMatch - http://host/xyz[/abc] => http://xyz.host/[abc]

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

 



What's the canonical way to redirect the following?

http://host/xyz[/abc]
to
http://xyz.host/[abc]

The following works

RedirectMatch ^xyz(.*) http://xyz.host$1

but suffers from the problem that

http://host/xyz123

is redirected to

http://xyz.host123

which is not intended.

I suppose one way would be to use a pair of redirects:

RedirectMatch ^xyz http://xyz.host
RedirectMatch ^xyz/(.*) http://xyz.host/$1

but is there a better way?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-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