<p>It will be quicker to set that in your webserver(Nginx) virtual host than doing it on Cloudflare.</p>
<p>Add below in your Nginx config:</p>
<pre><code>if ($request_uri ~* &quot;\/\/&quot;) {
  rewrite ^/(.*)      https://$host/$1    permanent;
}
</code></pre>

CC BY-SA 4.0
2021-06-22T08:49:44.650Z
2021-06-22T08:49:44.650Z
Jay
<p>Cloudflare page rules for removing multiple trailing slash</p>
<p>I want to set up the below things.</p>
<p><code>https://domain.com//</code> OR <code>https://domain.com//</code> OR <code>https://domain.com///</code> OR onwards</p>
<p>are redirecting to <code>https://domain.com/</code></p>
<p>How can I set up this using the Cloudflare page rule?</p>

<cloudflare>
Cloudflare page rules for removing multiple trailing slash
Subhash
# Cloudflare page rules for removing multiple trailing slash

(Asked by: username_0 on 2021-06-21)

Cloudflare page rules for removing multiple trailing slash

I want to set up the below things.

`https://domain.com//` OR `https://domain.com//` OR `https://domain.com///` OR onwards

are redirecting to `https://domain.com/`

How can I set up this using the Cloudflare page rule?

**Tags:** cloudflare


---

## 1 answers

### Answer by username_1 on 2021-06-22. Score: 1 | Accepted answer

It will be quicker to set that in your webserver(Nginx) virtual host than doing it on Cloudflare.
Add below in your Nginx config:
if ($request_uri ~* "\/\/") {
  rewrite ^/(.*)      https://$host/$1    permanent;
}


---

