I am currently using Caddy as a reverse proxy.
rewrite / /index.html
https://localhost/
--> https://localhost/index.html
https://localhost/?p1=v1&p2=v2
--> https://localhost/index.html?p1=v1&p2=v2
Now I want to additionally change the path /static
to index.html
. However, a URL parameter static=true
should then be added.
https://localhost/static
--> https://localhost/index.html?static=true
This additional URL parameter should not influence the existing para开发者_运维百科meters.
https://localhost/static?p1=v1&p2=v2
--> https://localhost/index.html?static=true&p1=v1&p2=v2
How do I have to adjust my caddyfile to make this work as desired? I just tried the following, but unfortunately it didn't work.
rewrite /static /index.html?static=true
精彩评论