我超级卡在这里,如何将mydomain.com/php/hello-world.php转换为mydomain.com/hello-word ...下面的示例仅下载我的php文件,而不显示内容。请帮助
server {
listen 80;
server_name mydomain.com www.mydomain.com;
root /var/www/mydomain;
index index.php;
location / {
try_files $uri $uri/ /php$uri.php =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
}
}