tags:

views:

30

answers:

1

I have a similar situation to the one described in the title.

All that I need to do is map all requests in the form /search/?q=test to /test. This is because we are changing the way our search works to make it user friendly, but still want to allow for backward compatability (i.e. anyone that may have these links bookmarked etc).

However, thus far I have this:

RedirectMatch 301 /search/?q=(.*) /$1

And that doesn't work, but:

RedirectMatch 301 /search/(.*) /$1

does...

Any idea why?

Cheers.

A: 

have you tried with RedirectMatch 301 /search/\?q=(.*) /$1 ?

I am using the \ before the ? (to force it being used as a literal character) in case it gets treated as a special char (which it is, in regular expressions..)

Gaby
I did try that yeah, to no avail unfortunately : [
Matthew Haworth