cloudflare-php icon indicating copy to clipboard operation
cloudflare-php copied to clipboard

PageRules not work

Open John-Henrique opened this issue 1 year ago • 0 comments

I`m trying do a page rule redirection, but every time get a error "1004 - Page Rule validation failed: See messages for details"

This is the example of code

        $pageRulesT = new Cloudflare\API\Configurations\PageRulesTargets( "webmail.domain.com/*" ); // Page Rules Targets
        $pageRulesA = new Cloudflare\API\Configurations\PageRulesActions( 301, 'https://mail.zoho.com/zm/' ); // Page Rules Actions
        $pageRules->createPageRule( $zoneID, $pageRulesT, $pageRulesA, true, null );

How to solve this?

John-Henrique avatar May 24 '23 01:05 John-Henrique