Reputation: 1
I've got an issue when redirecting one of my blog's url:
As you can see the %E2%80%93
is a pain in the a**, I looked at diverse forums, but no solution there appeared to solve my situation.
I put that line in the .htaccess
:
RewriteRule ^category/moving-to-barcelona-tips/barcelona-legality([^.%E2%80%93])barcelona-shopping-health-public-transport(.*)$ category/moving-to-barcelona-tips/barcelona-day-life$1 [R=301,L]
P.S: I've got RewriteEngine On and RewriteBase / etc. I've already redirected other URLs, just this one is not working.
Many thanks in advance! :)
Florian
Upvotes: 0
Views: 214
Reputation: 785128
You can use take regex help to avoid matching that character:
RewriteRule ^category/moving-to-barcelona-tips/barcelona-legality.*?barcelona-shopping-health-public-transport(.*)$ category/moving-to-barcelona-tips/barcelona-day-life$1 [R=301,L,B]
Note use of .*?
instead of that character to match any arbitrary string there.
Upvotes: 1