Redirect problems WPML querystrings
-
Client has reported a couple of issues with Redirects they are trying to add. I’ve had a bit of a test and believe i know why this is, but i am after a suggestion to get around the issue.
We’re using WPML on a website to host 2 language versions of pages. This is handled via query string. E.g. ?lang=en-US is appended to pages go to a “US” version of the webpage.
See our redirect rules below:
Base language (working):
/spectrum-hertfordshire-fingerprint-drug-test/ redirect to /news-resources/US Language (not working):
/spectrum-hertfordshire-fingerprint-drug-test/?lang=en-US redirect to /news-resources/?lang=en-USEssentially our problem is with the US language redirect, when going to the target url (/spectrum-hertfordshire-fingerprint-drug-test/?lang=en-US), it’s actioning the base language redirect instead. E.g Redirecting the user to the wrong language page (going to /news-resources/ rather than /news-resources/?lang=en-US)
I tried testing a change to the base language redirect rule by using a seperate url (/spectrum-hertfordshire-fingerprint-drug-test-bk/), but it seems the US language redirect still doesn’t work when going to the target url (/spectrum-hertfordshire-fingerprint-drug-test/?lang=en-US), but this time no redirect is done at all.
It seems the plugin is ignoring the querystring part of the urls entirely, and so the redirect is going to the wrong destination / being ignored entirely.
Is there anyway we can fix this?
Thanks
The topic ‘Redirect problems WPML querystrings’ is closed to new replies.