• I recently changed my Permalinks from:

    https://www.example.com/blog/2011/01/01/slug-goes-here (where “2011/01/01” can be any digit)

    to

    https://www.example.com/blog/slug-goes-here

    When I use Urban Giraffe’s 301 direction I’ve tried to use the following regular expression to remove the date

    /blog/(d*)/(d*)/(d*)/(.*) => /blog/$4

    I do not get my desired markup. In fact, it doesn’t do a redirect at all. Am I missing something? Or am I supposed to make multiple redirects? Because if this is the case that didn’t help either.

    Any help is GREATLY appreciated. Thanks ahead of time!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Interesting… the Urban Giraffe page seems to indicate that your regex is correct but if I were writing that regex under ‘normal’ string parsing circumstances I’d do this /blog/([0-9]*)/([0-9]*)/([0-9]*)/(.*) => /blog/$4 instead.

    Thread Starter RomB

    (@romb)

    Wow. You are too awesome! I didn’t think a normal regex parse would work. It works great!

    I can’t thank you enough.

    Can you see what is wrong with mine?

    From:

    /profile.aspx?mid=555

    To:

    /member-page/

    I am using:

    /profile.aspx?mid=([0-9]*) => /member-page/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks Regex Redirection’ is closed to new replies.