mirror of
https://codeberg.org/vlw/victorwesterlund.com.git
synced 2025-09-14 11:33:41 +02:00
Extensionless php for API
This commit is contained in:
parent
4516299557
commit
38bf06635e
1 changed files with 7 additions and 2 deletions
|
@ -61,8 +61,9 @@ server {
|
|||
|
||||
index router.php;
|
||||
|
||||
location \ {
|
||||
try_files $uri $uri/ $uri.html $uri.php$is_args$query_string;
|
||||
location / {
|
||||
try_files $uri $uri.html $uri/ @extensionless-php;
|
||||
index index.html index.htm index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
|
@ -72,6 +73,10 @@ server {
|
|||
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
|
||||
}
|
||||
|
||||
location @extensionless-php {
|
||||
rewrite ^(.*)$ $1.php last;
|
||||
}
|
||||
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
return 404;
|
||||
|
|
Loading…
Add table
Reference in a new issue