WordPress.org

Ready to get started?Download WordPress

Forums

Permalink change - 301 redirect (4 posts)

  1. jackfuture
    Member
    Posted 1 year ago #

    Hi, I want to change my permalink structure from

    /%post_id%/%postname%/

    to

    /%category%/%post_id%-%postname%/

    How should be the 301 redirection code for htaccess?

  2. FranceImage
    Member
    Posted 1 year ago #

    Hello,

    Try changing the structure without redirection in the htaccess ... In some cases WordPress does the redirect for you

  3. jackfuture
    Member
    Posted 1 year ago #

    Just tried, it didn't work unfortunately.

  4. FranceImage
    Member
    Posted 1 year ago #

    It looks like you will have to put one line per post in your htaccess

    RedirectPermanent URL-path URL

Topic Closed

This topic has been closed to new replies.

About this Topic