Redirection 301

Hello. I made a redirect on the Page Rules page from https://olddomain.com/* > Forwarding URL > https://newdomain.com. But all requests like https://olddomain.com/file/namefile are redirected to the main page https://newdomain.com. How can I make redirects go from https://olddomain.com/file/namefile to https://newdomain.com/file/namefile? Thanks

Page Rule should be *olddomain.com/* (both stars) and 301 redirect to https://newdomain.com/$2 ($2 means forward the second star’s path)

1 Like

Thanks, it works. You helped me a lot. Tell me, can I turn off the redirect for a specific country?

1 Like

No. If you need that functionality, you need to use Cloudflare Workers to write your own custom redirection rule instead of using Page Rules.

2 Likes

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