• qlddrones

    (@websupportguy)


    I did a restructure of my blog permalinks and need to create a bunch of HTACCESS redirects that will redirect old URLs with a language parameter on the end to the new permalinks for those URLs and pass the lang parameter. WordPress is creating redirects for the URLs without a language parameter, but those with a lang param are going to 404.

    An example of this would be:

    Source URL: /this-old-postname/?lang=(*)
    Destination URL /blog/this-new-postname/?lang=$

    But I need to be able to do lots of these, each unique, so if you are able to provide an example can you please provide it for two redirects which would work for the following actual examples?

    Source: http://www.travelnasia.com/thailand/bangkok/don-mueang-airport/?lang=zh
    Destination: http://www.travelnasia.com/thailand/don-mueang-airport-bangkok/?lang=zh
    Source: http://www.travelnasia.com/blog/map-attractions-bangkok-skytrain/?lang=zh
    Destination: http://www.travelnasia.com/blog/bangkok-skytrain-bts-mrt-lines/?lang=zh

    Thanks in advance for any help.

  • The topic ‘Help with regex for URL redirects with parameter’ is closed to new replies.