Hi Don,
I hope you’re well, thank you so much for your answer here!
I updated the plugin and added the function into my child theme file but I didn’t totally solved the issue.
I guess my problem comes from a plugin designed for translation purposes: QTranslate X.
Here’s my case:
I have a page with base URL https://mywebsite.com/mypage.
Trough QtranslateX, this url becomes dynamically https://mywebsite.com/lang/mypage (for example: https://mywebsite.com/it/mypage)
Then, because of another plugin, I may have some parameters added to the URL and what I need, as I told you in the first place, is to redirect to another page unless a parameter is added.
So, I need to have https://mywebsite.com/mypage redirected to https://mywebsite.com/my-other-page but https://mywebsite.com/mypage/?param=etc mustn’t be redirected.
Problem is, even if I don’t take the parameter thing into account, I only get to redirect from page A to page B if I set it to meta redirect, in a regular rule from post edit page… 301 and Quick Redirects don’t work.
I guess this issue comes from QTranslate X, and the way it adds the /lang/ to the URL when the page is loading.
So if I set a regular redirect with meta option, it works, but I can’t exclude the URL with parameter from the redirection.
What I’d like to do would be trying to use Quick Redirects and the function you gave me to exclude URLs with parameters from redirection rules, but I understood from your help section that those only are 301 unless we override them with filters… I think maybe that’s why I can’t get it to work… and I’d need to make Quick Redirects work as meta type, so that redirections would have a chance to work even if QTranslate X adds its /lang/ thing to the URLs.
I’m not quite sure I made myself clear but I hope you’ll understand my problem here… sorry to bother you with such a situation… thank you very much anyway,
Warm regards,
emilien