• Resolved Jaya

    (@moyajaya)


    Hello,

    in short: I had the following structure:
    /%year%/%monthnum%/%day%/%post_id%

    and I changed it to:
    /%post_id%

    I’d like visitors to the old URL (from a search engine for example) to be redirected to the new one.

    i found a solution to Redirect Day and name permalinks to /%postname%/
    but I have no idea how to change it to work in my case.

    RedirectMatch 301 /([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ https://www.domain.com/$4

    Appreciate your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    RedirectMatch 301 /([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ https://www.domain.com/$4

    That says to look for ####/##/##/anything, which is a little better.

    Though WP should redirect for you.

    Thread Starter Jaya

    (@moyajaya)

    Thank you so much! That worked ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Redirect old links after change of Permalinks?’ is closed to new replies.