Auto Redirect to Lowercase URL

Dear All

Sometimes my visitor browsing my website directly with uppercase or mix.

Example they visit https://angora.id/Quote (with B uppercase) instead of https://angora.id/quote and getting 404 Not Found because no auto redirect to lowercase URL.

Any solution about this issue?

Thanks

Hello there,

Better solution is to create 404 custom page where you can direct a user to the right direction. Else, you may use Page Rules (if that’s very particular & only a few)
https://support.cloudflare.com/hc/en-us/articles/218411427

Which page rules should I use to make auto lowercase redirect in every pages URL?

In this case, you may create 301/ 302.

What you want is a Transform Rule. In the Cloudflare dashboard, choose Rules in the sidebar and click Transform Rules. Click “Create transform rule” and choose “Rewrite URL” as the type.

Now, since you want to match all requests, make a rule for Hostname and put in your domain. If you want to cover both example.com and www.example.com you could change Operator to “ends with”.

Under Path, choose Rewrite to, change to Dynamic, and use the expression

lower(http.request.uri.path)

2 Likes

It works. Thanks.

1 Like

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