|
Home > Archive > Apache Server configuration support > August 2006 > Redirect URL that contains %20
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Redirect URL that contains %20
|
|
| mail4mike@gmail.com 2006-08-24, 7:30 pm |
| Hello,
I need to redirect a legacy URL to a new URL. The legacy URL is similar
to:
http://www.foo.com/testing/old%20web%20page.htm
I've tried to use a Redirect with /testing/old%20web%20page.htm, but
Apache (2.0.52) doesn't seem to recognize it.
I've also tried a few variations with the RedirectMatch directive, but
I can't seem to find a working regexp. I thought the following might
work, but I'm also a little rusty on my regexps.
RedirectMatch ^/testing/old\.*?page.htm$
Any ideas?
Mike K.
| |
|
| mail4mike@gmail.com wrote:
> Hello,
>
> I need to redirect a legacy URL to a new URL. The legacy URL is
> similar to:
> http://www.foo.com/testing/old%20web%20page.htm
> I've tried to use a Redirect with /testing/old%20web%20page.htm, but
> Apache (2.0.52) doesn't seem to recognize it.
>
> I've also tried a few variations with the RedirectMatch directive, but
> I can't seem to find a working regexp. I thought the following might
> work, but I'm also a little rusty on my regexps.
> RedirectMatch ^/testing/old\.*?page.htm$
Lose the \ before the ., it makes it a literal.
Isn't %20 converted back to spaces before it enters the rewriteengine?
Grtz,
--
Rik Wasmus
| |
| mail4mike@gmail.com 2006-08-24, 7:30 pm |
| Not sure about how Apache treats %20, but your regexp correction worked
perfectly. My URL is redirecting correctly now.
Thank you,
Mike K.
Rik wrote:
> mail4mike@gmail.com wrote:
>
> Lose the \ before the ., it makes it a literal.
> Isn't %20 converted back to spaces before it enters the rewriteengine?
>
> Grtz,
> --
> Rik Wasmus
|
|
|
|
|