Menu
I’m working on a site that currently has both trailing slash and non-slashed URLs active. For example, visiting /page-name and /page-name/ both work and causing SEO canonical issues.
Using only CloudFlare, I’d like to write a Page Rule to solve this. I tried:
// URL to forward
*example.com/*
// Final 301 redirect destination
https://example.com/$2/
CloudFlare then gives this error and will not create the Page Rule:
“Forwarding URL matches the target and would cause a redirect loop.”
How can I resolve this?