Hello, I am trying to create some snippets to improve my work.
Which model is better or work on Caddy?
I don’t know if snippets can be loaded into snippets.
common snippet
(snippet1) {
redir 308 {
if {host} match (?:www\.)(.*)
/ https://{$1}
}
}
model 02
(conditional-redirect) {
if {host} match (?:www\.)(.*)
/ https://{$1}
}
and then:
(snippet2) {
redir 308 {
import conditional-redirect
}
}
Is it possible?
Another questions:
- using placeholder
{status}
, how to check if browser supports http code 308 or 301, such as 307 and 302? Any idea? - What the real difference between
{host}
and{hostonly}
? Ok, I know about the port information, but the string is the same if the port is common 80/443, no? - The
http.on
can be used to call a.sh
file?
Thank you very much.