sl4mmer
sl4mmer

Reputation: 371

Nginx rewrite, whe url ends with more then one slash

I have some 404 page (example.com/404.html)

I want to forward all requests ending with more then one slash to it

for example

and so on.

Im not exeprienced in nginx configuration, so il be very grateful for help

Upvotes: 0

Views: 475

Answers (1)

rchukh
rchukh

Reputation: 2947

You just want to use this behavior for trailing slashes or for double/triple/etc slashes anywhere in the URL?

If you need to do the latter - see merge_slashes. It can disable the slashes merging for whole URL.

Upvotes: 1

Related Questions