The page isn’t redirecting properly Cloudflare redirect


#1

I am running my site on port 8080 (I can’t run it on port 80). So I created two page rules. The first one redirects http://example512.tk to http://example512.tk:8080. The second rule redirects http://www.example512.tk to http://example512.tk:8080. Why I try to open the site in firefox it gives me this error. The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete.


#2

You might try specifying :80 for your default rule to see if that makes a difference. While I haven’t specifically tested according to https://support.cloudflare.com/hc/en-us/articles/200168306-Is-there-a-tutorial-for-Page-Rules- if a port isn’t specified it applies to all ports which means it is also happening on the :8080 port (looping back to itself).


#3

Quickly without seeing the actual rules in place I assume you followed the suggested conventions when implementing. Are you putting trailing /* on the first url, and then /$1 on the second?

I typed www in front of the first url and I saw the large text briefly indicating I was seeing what you anticipated… then that disappeared, possibly you are working on that at the same time.

If you are on NGINX or Apache (htaccess) you are going to have to drop in redirects/directives for www OR use another page rule for it.

*www.example512.tk/*

and
http://example512.tk/$1

That strips the www off.

Edit: I’m likely wrong about this since it appears you are already doing that. It was just weird I saw the site for an instant the first time, then poof… as things go sometimes.


#4

@cscharff Your suggestion worked! Thanks.