mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2026-10-11 22:47:12 +00:00
[Nginx] Avoid php extensions, use rewrite
This commit is contained in:
1 parent
b2067cb521
commit
2f18eb5ad0
1 file changed
+12
@@ -50,6 +50,18 @@ server {
|
||||
absolute_redirect off;
|
||||
root /web;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ @strip-ext;
|
||||
}
|
||||
|
||||
location /edit {
|
||||
rewrite ^/edit/(.*)/(.*) /edit.php?$1=$2;
|
||||
}
|
||||
|
||||
location @strip-ext {
|
||||
rewrite ^(.*)$ $1.php last;
|
||||
}
|
||||
|
||||
location ~ ^/api/v1/(.*)$ {
|
||||
try_files $uri $uri/ /json_api.php?query=$1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user