{"id":6483550,"date":"2015-08-27T15:58:04","date_gmt":"2015-08-27T15:58:04","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/redirect-url-with-query-string\/"},"modified":"2016-08-30T17:18:41","modified_gmt":"2016-08-30T17:18:41","slug":"redirect-url-with-query-string","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/redirect-url-with-query-string\/","title":{"rendered":"Redirect URL with query string"},"content":{"rendered":"<p>I need the correct regex to redirect a language query string URL to a directory URL. I want any of the path leading up to this query string included for example:<\/p>\n<p>\/page\/subpage\/subpage\/?lang=fr<\/p>\n<p>to<\/p>\n<p>\/fr<\/p>\n<p>I&#8217;ve tried several combinations, any help is appreciated:)<\/p>\n<p>https:\/\/wordpress.org\/plugins\/redirection\/<\/p>\n","protected":false},"template":"","class_list":["post-6483550","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6483550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6483550\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6483550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}