close

June 2024 promo! Join our Discord free of charge.

Slick­Stack
Lightning-fast WordPress on Nginx

how to implement wildcard 301 in Cloudflare’s new “redirect rules”

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #25014 Reply
    Kathryn
    Guest

    This has been driving me crazy. They are getting rid of the Page Rules. And new the Redirect Rules does not support the * wildcard and $1 target syntax anymore and there is no option for this in the drop down regex.

    #25015 Reply
    Nicholas
    Guest

    Do you have to pay for this now? What happened? NO EXPLANATION

    #25016 Reply
    Kenneth
    Guest

    I can’t find it right now. But I saw in the Developer docs a few days ago that wildcards are now only supported in the Business or Enterprise plan. Not sure if it’s accurate. But I saw them say it somewhere like that.

    #25017 Reply
    Christopher
    Guest

    I see only:

    https://developers.cloudflare.com/rules/page-rules/reference/wildcard-matching/

    Page Rules are deprecated. You should consider alternative Rules options due to their enhanced configurability. Refer to the migration guide for details.

    #25018 Reply
    Logan
    Guest

    https://community.cloudflare.com/t/static-vs-dynamic-redirects/584719/5

    “Redirect Rules/Ruleset Engine does not support wildcard characters like that.
    There is regex/matches support, but only for Business Plans or higher.”

    welp.

    #25019 Reply
    Amber
    Guest

    GIVE US BACK OUR WILDCARDS CLOUDFLARE

    #25020 Reply
    Christopher
    Guest

    there’s a workaround using concat and substring but it’s pretty ugly and it doesn’t work as well in my tests, a CF employee mentions it on their forum.

    Filter expression:

    (starts_with(http.request.uri.path, "/old-path/"))

    Dynamic URL redirect expression:

    concat("/new-path/", substring(http.request.uri.path, 10))

    where start byte value (10 in my example) is the length of the old path.

    source
    https://community.cloudflare.com/t/dynamic-wildcard-redirect-rule/657658/2

    #25021 Reply
    Philip
    Guest
    #25053 Reply
    Frances
    Guest

    wow, looks easy! /s

    🥺

    #25078 Reply
    Angela
    Guest

    I really hope they make a UI option for this, because it’s too difficult

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: how to implement wildcard 301 in Cloudflare’s new “redirect rules”

Thanks to our generous sponsors for their support!