How to exclude part of redirects from Page Rules

Hi, I’ve set up redirects:
site.com/catalog/* Forwarding URL (Status Code: 301 - Permanent Redirect, Url: (https://site.com/new-catalog/$1)

But I want to exclude from redirects some part of URLs from old version.
I want to exclude site.com/catalog/promotions*
Is there such an option in Cloudflare?

In .htaccess i could do it by this rule:
RewriteRule ^(catalog/promotions) - [L]

But i want to do that in Cloudflare.

Thanks in advance.

You can add a Page Rule above your Redirect page rule.

Match: site.com/catalog/promotions*
Setting: “Always Use HTTPS” (I picked that one because it shouldn’t change anything)

Now your Promotions directory will match a rule, and those requests will not go on to match the next rule.

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.