URL redirects not working with ?lang=XX
-
I desperately need some help with redirection of URLS that include the “?lang=XX” query parameter. For some reason URL redirects that are working perfectly without the parameter fail to 404 with the parameter (I’m using the Transposh translation plugin).
For example:
http://www.travelnasia.com/thailand/bangkok/don-mueang-airport/
redirects tohttp://www.travelnasia.com/thailand/don-mueang-airport-bangkok/
but
http://www.travelnasia.com/thailand/bangkok/don-mueang-airport/?lang=zh
goes to 404I’ve tried natural redirects by WordPress (changing the URL in the editor), I’ve tried the Redirect plugin including with regex and I’ve tried every combination I can think of in HTACCESS redirects, but no joy.
If anyone has any suggestions to try, I would really appreciate it.
At the moment, the two most likely HTACCESS rules appear to be:
RewriteCond %{QUERY_STRING} ^$ [NC] RewriteRule ^(thailand/bangkok/don-mueang-airport)$ http://www.travelnasia.com/thailand/don-mueang-airport-bangkok/$1 [R=301,NC,L] redirect /thailand/bangkok/don-mueang-airport/$ http://www.travelnasia.com/thailand/don-mueang-airport-bangkok/$1 [R=301,NC,L]
But of course neither of them actually work.
BTW I am a web developer, not a programmer, so my regex and htaccess knowledge is somewhat limited. I can usually get them to work, but not in this case.
- The topic ‘URL redirects not working with ?lang=XX’ is closed to new replies.