I’m trying to make a rule to remove multiple /// in uri
What steps have you taken to resolve the issue?
I’ve try to create a redirect rule using wildcard pattern:
rule: https://statbet.com/*//*
action: https://statbet.com/${1}/${2}
status code: 301
the goal is to make a redirect from https://statbet.com/dsds///cdcdc/dcdcdc/ccd////ccd to https://statbet.com/dsds/cdcdc/dcdcdc/ccd/ccd
they idea was to split url to 2 parts - before // and after //, and then concat part1+/+part2, changing // to /
it would create multiple redirects, but in the end user will be on a correct page.
It’s a request from SEO people to make a behavior like that. There are no generated links that match that pattern, but as far I understand there are some typos in inbound links.
And for Google a/a different from a//a that’s why we were asked to make 301 redirects, that cover all possible links with multiple slashes.
Unfortunately there is no way to handle such a case from framework side, and I got an idea to make those redirects on Cloudflare (because previous requests, like lowercase all URLs were successfully done by redirection rules)
Yep, seems that normalization can’t help. It should be done by redirection rule to get 301 redirect. There is a regexp support on Business+ plans, but free and pro plans are limited to wildcard replace, which seems to be not working with //