Article From:

Configuring JIRA + confluences these days has been a problem, and finally a bug has been pinpointed because of an extra slash
For example (Bug)

to (Correct)

I modified the nginx configuration according to one point of view, but how rewirte was unsuccessful, I asked for the correct position.
Remove an extra slash

The following is my configuration. Reverse proxy

# rewrite There is no effect on how to test.Upstream {Server;}Server {Listen 80;Server_name;Rewrite / / (. *) $/$1Permanent;Server_name_in_redirect off;Location / {Rewrite / / / (. *)$/$1 last;Proxy_pass;}}

Answer 0:
if ($request_uri ~* "\/\/") {
      rewrite ^/(.*)      $scheme://$host/$1    permanent;

Let’s try it.

Leave a Reply

Your email address will not be published. Required fields are marked *