Files
damercier 0c5ab8b7bf
Build and push chill website image / build (push) Successful in 1m16s
Add redirection for old url, and clean error page in case of wrong url.
2026-04-17 10:55:23 +02:00

45 lines
2.0 KiB
Caddyfile

:80 {
root * /usr/share/caddy
handle_errors {
@old_root expression path_regexp('^/(fr|en|nl)(/?)$')
redir @old_root / 301
@old_get_chill_configuration expression path_regexp('^(/(fr|en|nl))?/get-chill/configuration')
redir @old_get_chill_configuration /resources/technical-documentation/ 301
@old_get_chill_install expression path_regexp('^(/(fr|en|nl))?/get-chill/install')
redir @old_get_chill_install /resources/installation/ 301
@old_get_chill expression path_regexp('^(/(fr|en|nl))?/get-chill/')
redir @old_get_chill /pricing/ 301
@old_presentation_accomp expression path_regexp('^(/(fr|en|nl))?/presentation/accompanying-courses')
redir @old_presentation_accomp /features/suivi-accompagnements/ 301
@old_presentation_persons expression path_regexp('^(/(fr|en|nl))?/presentation/persons')
redir @old_presentation_persons /features/suivi-usagers/ 301
@old_presentation_stats expression path_regexp('^(/(fr|en|nl))?/presentation/export-stats')
redir @old_presentation_stats /features/rapports-statistiques/ 301
@old_presentation_doc_gen expression path_regexp('^(/(fr|en|nl))?/presentation/doc-generation')
redir @old_presentation_doc_gen /features/generation-documents/ 301
@old_presentation expression path_regexp('^(/(fr|en|nl))?/presentation/')
redir @old_presentation /features/ 301
@old_start_user expression path_regexp('^^(/(fr|en|nl))?/start/user')
redir @old_start_user /resources/manuals/ 301
@old_start expression path_regexp('^^(/(fr|en|nl))?/start/')
redir @old_start / 301
header Content-Type text/html
rewrite * /error/index.html
file_server
}
file_server
}