Forums

WordPress Post URLs - 301 Redirects With Hyphen (%e2%80%93) Character (2 posts)

  1. davede
    Member
    Posted 10 months ago #

    Hi all,

    Trying to do a simple 301 redirect in the .htaccess file.

    However some of my post URLs actually contain the %e2%80%93 character which would be seen as a long dash ('-') which you can replicate by typing two words with a dash between them in a word editor.

    Anyways seems like our new CMS doesn't like the %e2%80%93 character and neither does the htaccess file.

    Anyone got any ideas on how to 301 redirect the page with the %e2%80%93 character in the URL?

  2. davede
    Member
    Posted 10 months ago #

    Hi all,

    got around the issue by using the (.+) character to match any character that could be there and then redirect it to the new URL.

    e.g.

    301 redirect page-(.+)-here/ http://www.example.com/page-here

    Hope this helps someone.

Reply

You must log in to post.

About this Topic