Does this work?
Sourec: /templates/(.*)
Target: /business-plan/
-
This reply was modified 9 years, 6 months ago by
mostman.
Hi,
I’m having a similar issue.
I recently moved my blog posts URL from mysite.com/post-title to mysite.com/blog/post-title.
I’ve made all the redirections with the plugin ; it works fine, except when they have some parameters.
So all the URL with the google tracking parameters (like : utm_content=, utm_source= etc) are not redirected.
I tried this :
source : mysite.com/post-title?(.*)
direction : mysite.com/blog/post-title
But it does’nt work, it causes a redirection loop (i’m redirected to mysite.com/blog/blog/blog/blog/log/blog/post-title).
Can you help me with that ? thanks !
It looks like you want to keep the parameters and add them to your redirected URL and I am looking to remove them.
If you want to keep them and add your analytics tracking to the new url, then do this:
^/post-title.*
/blog/new-post-title
the ^ means starts with and the .* will take everything after it and add it to the end. You don’t need the parenthesis around the .*
and make sure to check the regex box
Unfortunately, that still adds the query parameters to the new url
Great, it works fine, thanks ! With this rule, the redirection works, the parameters are removed, but it’s OK, since what I wanted to avoid is the 404 error.