hope somebody can help me, Im trying to force nginx config to show specific files when the a url is reached, example:
/contact uses contact.php
/shop?something=x uses shop.php
/shop/xxxxx uses category.php
/shop/sale/xxxx?something=x uses product.php
/tienda/xxxxx uses categoria.php
Appreciate any help
/shop/xxxxx uses category.php:
rewrite ^/shop/(.*)$ /category.php?category=$1 last;
Check out NGINX rewriting: https://www.nginx.com/blog/creating-nginx-rewrite-rules/
As well, you can check out: https://www.thegeekstuff.com/2017/08/nginx-rewrite-examples/
I would highly recommend using some sort of framework. URL rewriting can become very hard to maintain really quickly.