L
L
lexstile2017-09-06 11:26:46
PHP
lexstile, 2017-09-06 11:26:46

Why does the redirect to nginx not work?

Need a redirect from no slash to slash.
I prescribe:

location ~ .+/$ {
      rewrite (.+)/$ $1 permanent;
    }

I restart the server.
Does not work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Mukovoz, 2017-09-06
@lexstile

Hold
rewrite ^([^.\?]*[^/])$ $1/ permanent;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question