Im not a SysAdmin so i don't really understand how its work to do what I want. But I have a PHP website with .php file and I want to remove the .php in URL.
On apache its easier but nginx is better so i want to know how to do this on nginx.
Here is my config:
server {
listen 80;
server_name xx.com www.xx.com;
root /var/www/xx;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Thank you all