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
The following works
RedirectMatch ^xyz(.*) http://xyz.host$1
but suffers from the problem that
http://host/xyz123
maybe RedirectMatch ^xyz(/.*)? http://xyz.host$1
-
To unsubscribe, e-mail:
On 17 August 2012 15:02, Eric Covener cove...@gmail.com wrote:
The following works
RedirectMatch ^xyz(.*) http://xyz.host$1
but suffers from the problem that
http://host/xyz123
maybe RedirectMatch ^xyz(/.*)? http://xyz.host$1
That won't match
http://host/xyz
which should redirect to
maybe RedirectMatch ^xyz(/.*)? http://xyz.host$1
That won't match
http://host/xyz
question mark was part of the regex not punctuation, but not sure the
redirect w/o trailing slash is okay.
rejiggered to always have the trailing slash:
RedirectMatch ^xyz/?(.*) http://xyz.host/$1
On 17 August 2012 15:30, Eric Covener cove...@gmail.com wrote:
maybe RedirectMatch ^xyz(/.*)? http://xyz.host$1
That won't match
http://host/xyz
question mark was part of the regex not punctuation,
Very sorry, my bad, I should have read more carefully.
Your suggestion will work fine.
On 17 August 2012 15:58, sebb seb...@gmail.com wrote:
On 17 August 2012 15:30, Eric Covener cove...@gmail.com wrote:
maybe RedirectMatch ^xyz(/.*)? http://xyz.host$1
That won't match
http://host/xyz
question mark was part of the regex not punctuation,
Very sorry, my bad, I should have