NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
Hello, I'm wondering how we can achieve trailing slash rewrite in Nginx Unit in case of PHP (Laravel) app? I need to return 301 redirect for all requests that ends with / to address without it. The purpose of it is to fight with duplicated content from SEO perspective.
In Nginx it can be achieved with one simple rewrite:
Hello, I'm wondering how we can achieve trailing slash rewrite in Nginx Unit in case of PHP (Laravel) app? I need to return 301 redirect for all requests that ends with
/
to address without it. The purpose of it is to fight with duplicated content from SEO perspective.In Nginx it can be achieved with one simple rewrite:
rewrite ^/(.*)/$ /$1 permanent;
How we can do it in case of Nginx Unit?