Redirection blog/%year%/…

#45294
Viewing 5 replies - 1 through 5 (of 5 total)
  • Todd
    Rank Math free

    Hello Ludovic,

    Thanks for getting in touch with us.

    You can create a custom redirection in Rank Math to redirect your post permalinks to cleaner URLs by following these steps:

    1). Head over to Rank Math > Dashboard and enable redirections module
    2). Create a new redirection and add this rule:

    
    Source URLs: /([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+)
    Type: Regex
    Destination URL: $1/$2
    

    3). Activate the redirection.

    Looking forward to helping you. Thank you.

    Hi Todd

    Thanks for your reply.
    And with this code the initial URL will be redirected ?

    where can I find the correspondences between the variables% xxx% of the initial URL and the code that you added? what is blog? the year? the month ? the day ? the name of the post?

    Thanks
    Regards
    Ludovic

    Hello,

    Thank you for contacting Rank Math today.

    The snippet shared by my colleague makes use of regex expressions to match the digits eg /2020/04/22 on the post URL and only returns the post name and thus you don’t need to perform any other replacement.

    As a correction, you will also need to pass the word blog as shown below:

    Source URLs: /blog/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+)
    Type: Regex
    Destination URL: $1/$2

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hi,

    Thanks for your reply.

    Sorry but it doesn’t run.

    See : https://www.screencast.com/t/ew57xD77afU

    I have this error message : https://www.screencast.com/t/I8o7ChH4N8

    How can I fix that ?
    Thanks
    Regards
    Ludovic

    Hello,

    Thank you for getting back to us.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Redirection blog/%year%/…’ is closed to new replies.