Helgi Sidorov
Helgi Sidorov

Reputation: 1

Removing trailing slashes in nginx-unit

Is there any way to remove trailing slashes in nginx-unit config?

In nginx I have the following:

    if ($request_uri ~* "^(.+)/$") {
        return 301 $scheme://$http_host$1;
    }

But it's hard for me to convert it to nginx-unit format. Is there any idea?

I've tried options like

  {
      "match": {
          "uri": [
              "/.*\\/$"
          ]
      },
  
      "action": {
          "rewrite": "/$1",
          "pass": "applications/php/index"
      }
  },

but with no success

Upvotes: 0

Views: 31

Answers (0)

Related Questions