Using the following caddyfile:
:80 {
tls off
root /var/www
gzip
rewrite {
to {path} {path}/ /index.php?{query}
}
fastcgi / 172.18.0.1:9000 php {
index index.php
}
}
I have two files in the /var/www
directory: index.php
and foo.php
. Using the above example, a request to http://mydomain.com/foo.php is returning index.php
. My understanding was that Caddy would stop at the first match it found, but is seems that it always processes the last destination regardless of a previous match.
Any help would be greatly appreciated.