Page Rule validation failed: See messages for details. (Code: 1004)

Hi,

Using CloudFlare and it’s causing some issues with serving images to my users, so I want to create a Page Rule to “Bypass” Cache on the entire domain (for testing). E.g. URL = domain.com/*

However, I want to retain a Page Rule on domain.com/*, which is a Forwarding URL rule for a Permanent 301 Redirect to https://www.domain.com/$1.

The problem is, I can’t add additional settings to the Forwarding URL page rule, because it’s limited to only that single setting. So, when I try to create the Bypass Cache setting on the new page rule, it gives me the following errors:

Page Rule validation failed: See messages for details. (Code: 1004)

.distinctTargetUrl: Your zone already has an existing page rule with that URL. If you are modifying only page rule settings use the Edit Page Rule option instead**

Is there is any easy way around this? I.e. to have both page rules present, or merged into one given it’s on the same URL… ?

Thanks.

Hi @DeanJP,

You can’t merge the rules, but if you are redirecting the root domain to www, presumably it’s just www that you want to disable caching for? So you keep your redirection page rule, but have one for www.example.com/* to disable caching.

If it is for testing, you could use development mode, which disabled caching on the entire zone for a few hours.

1 Like

Hi @domjh - ahh, yes that’s a good catch!

Let me try this, although can I confirm that it should be www.example.com* to disable caching on? This way, it would include the homepage as well, since my current page rule on the redirect means even if user clicks a link to https://www.example.com, then they land exactly on that domain without the forward slash /.

Thank you again for the helpful response!

1 Like

Yes,

should work.

No problem!

1 Like

Thanks!!

1 Like

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