WordPress and NGINX - permalinks are not working with ending slash
I have added this line in the nginx configuration file
try_files $uri $uri/ /index.php?$args;
rewrite ^([^.]*[^/])$ $1/ permanent; #adding slash
and the permalinks are working fine, but when adding / (please see rewrite rule how i'm adding it) NGINX gives me 404 error.
For example somedomain.com/post/ThisIsPermaLink (working) after adding slash somedomain.com/post/ThisIsPermaLink/ (gives 404 error)
But all this two versions are working on Apache environment. Apache is redirecting all requests without slashes (somedomain.com/post/ThisIsPermaLink) to somedomain.com/post/ThisIsPermaLink/
So i need same functionality with NGINX
Topic permalinks nginx Wordpress
Category Web