1. Caddy version:
2.6.2
simple question.
- If someone goes to my url, app.server1.c0m,
I need to append “/main” to the url when I reverse proxy to my server only if they had nothing after “.com”
I’m using this now:
app.server1.c0m {
reverse_proxy * {
to http://209.10.59.102
}
}
So i’d need this to end up going to: http://209.10.59.102/app
- If there IS a Query Parameter, I need to only allow it to go to the server IF it begins with “app”.
So if the request is: app.server1.c0m/index.html I would DISALLOW this. With some status code.
If the request is: app.server1.c0m/app/index.html , then its fine. send it on unmodified.
Is this possible?
I searched docs and tried things for over 1 hour and I see instructions for forwarding or redir to /b if they typed /a.
but i also need to check for null or empty string. i could not find example of this.