Redirection with page rule

Hi, i used to use cloudflare page rule redirection to redirect https://example.com/https://google.com/* to https://google.com/$1 this does not work anymore is there any other way i could do that? thank in advence.

If you say that used to work, then that’s either it’s a new bug in the parser or Cloudflare changed something in the logic, but it seems the parser does not like the double slash there.

You could always open a ticket with support for clarification but meantime you might want to move the whole thing to the query string instead, as that should still work

https://example.com/?https://google.com/*
1 Like

Thank this does work but i need to put ? for this to redirect which will not work for my use however i’m gonna open a support ticket.

Should Cloudflare not fix that and you stay within the free limit, then you could probably use a Worker too.

Ok by the way is there anyway i could do that with nginx directly ?

Most definitely, that would be a standard redirect.

thank.

A little update, i did try directly with nginx and … with https:// that does not work without it does. i don’t know what happening.

I would check the firewall logs. That looks like an open redirect, and might be blocked by OWASP rules.

If it does not work with Nginx you best clarify this on an Nginx related forum.

As for the page rules, I’d really recommend to use the query string, otherwise you can only contact support for clarification.

Yeah i did done a ticket.

Nope nothing in the firewall logs.

Still, expect that Cloudflare won’t fix that (unless they confirm it as bug).

Either

  • use the query string
  • do it server-side
  • use a Worker

Yep got it

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