views:

24

answers:

1

I need to rewrite a url that contains a comma to another URL. The original URL also contains +'s (pluses) which I have figured out need to be escaped with a backslash, but the commas don't seem to be read properly. Here's what it looks it like:

RewriteRule ^locations/New+York/Buffalo,\+Erie\+County,\+and\+Surrounding\+Areas$ "/locations/New+York/Buffalo" [R=301,NC]
A: 

I almost got it right, you only forgot to escape the first +:

RewriteRule ^locations/New\+York/Buffalo,\+Erie\+County,\+and\+Surrounding\+Areas$ "/locations/New+York/Buffalo" [R=301,NC]
Gumbo
Oops, stupid mistake. Thank you!!
Yevgeniy Женя Van Chuchin