• Resolved fabry19dice

    (@fabry19dice)


    Hello,
    I want to make redirect in redirection with regex
    I tried this but don’t work /^\d{4}/\d{2}/\default
    Redirection report me in 404 many error for this page
    /2016/06/default
    /2016/07/default
    /2016/08/default
    etc…

    How can to redirect this to my homepage? Can you help me?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Godley

    (@johnny5)

    Your regex doesn’t look correct. You can use something like https://regex101.com to test it out and make sure it works.

    The ^ needs to be at the start, and you are unnecessarily escaping the d in default – \default

    Thread Starter fabry19dice

    (@fabry19dice)

    Thankss but which is the right solution for you?

    Plugin Author John Godley

    (@johnny5)

    Without knowing exactly what you are trying to do it’s hard to say. If you use URL I mentioned then you can test your pattern so it correctly matches what you need.

    For example: \/\d*\/\d*\/(.*)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Redirect does not works with regex’ is closed to new replies.