Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Redirect old accented url (Drupal) to match new (WordPress)

Discussion in 'Misc WordPress Requests' started by Neil Sabol, Mar 20, 2018.

  1. Neil Sabol

    Guest

    Reply To: Redirect old accented url (Drupal) to match new (WordPress), by Neil Sabol

    Hello Dariusz,

    I hope you are doing well – I noticed this post has been open for a while without a reply.

    Would something like this work for your situation:

    https://stackoverflow.com/questions/18673576/replace-special-character-in-htaccess

    RewriteEngine On
    RewriteRule ^(.*)ą(.*)$ /$1a$2 [L,R=302]
    RewriteRule ^(.*)ę(.*)$ /$1e$2 [L,R=302]
    RewriteRule ^(.*)ś(.*)$ /$1s$2 [L,R=302]
    RewriteRule ^(.*)ć(.*)$ /$1c$2 [L,R=302]
    RewriteRule ^(.*)ó(.*)$ /$1o$2 [L,R=302]

    It is not link specific but it is character specific (and sadly my familiarity with the Polish alphabet is none) – that is, I am not sure if you would have more Rewrite Rules to replace Polish characters or to remap each URL, but hopefully rewriting the characters results in fewer rules.

    While testing/refining the rules, I recommend using 302 redirects instead of 301. Once all is working as expected, you can replace the 302s with 301s.

    Let me know if that helps and how things go.

    Thank you,
    -Neil

    Reply To: Redirect old accented url (Drupal) to match new (WordPress)
     
    #1

Share This Page

Monarch Social Sharing Plugin