Answer the question
In order to leave comments, you need to log in
How to convert url to lowercase using nginx?
How to redirect url addresses to lower case?
there is a product page:
https://beauto.com.ua/product/kyb-amortizator-gazo... - norms
https://beauto.com.ua/product/kyb-AmORtiZAtor-GAZo... - badly
desirable way without using perl and lua
Answer the question
In order to leave comments, you need to log in
I can offer such variant with perl. First you need to install perl on the server.
Find http {} and write in brackets
<span style="font-size:16px;"><span style="font-family:arial,helvetica,sans-serif;"> http {
perl_modules perl/lib;
perl_set $uri_lowercase ‘sub {
my $r = shift;
my $uri = $r->uri;
$uri = lc($uri);
return $uri;
}’;
</span></span>
<span style="font-size:16px;"><span style="font-family:arial,helvetica,sans-serif;">location ~ [A-Z] {
rewrite ^(.*)$ $scheme://$host#uri_lowercase;
}
</span></span>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question