I'm running joomla 3.7.3 using nginx 1.10.3 and I've a problem with removing trailing slashes. I've "search engine friendly URLs" turned on, as well as "Use URL rewriting".
I've these stuff in my nginx conf file:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/folder;
index index.php index.html index.htm default.html default.htm;
rewrite ^/(.+)/$ /$1 permanent;
server_name 000.000.00.000;
server_name_in_redirect off;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
return 403;
error_page 403 /403_error.html;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
And it's working, but partially. URLs like:
http://000.000.00.000/category/ sure became http://000.000.00.000/category
but when I try to access http://000.000.00.000/administrator/ it's now inaccessible, and Chrome says ERR_TOO_MANY_REDIRECTS
I can't figure how to fix this, I've also tried to replace:
location / {
try_files $uri $uri/ /index.php?$args;
}
with this:
location / {
try_files $uri /index.php?$args;
}
But then when I try to access http://000.000.00.000/administrator/ the server redirects me back to my home page http://000.000.00.000/
Please help me to figure this out.