Skip to content

Commit

Permalink
website: fix trailing slashes in redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
noxilixon committed Aug 10, 2024
1 parent ede2490 commit 3214d3d
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions templates/Caddyfile_website.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ berlin.freifunk.net {
path /
}

redir @de_before_en /de 302
redir @en_before_de /en 302
redir @de_only /de 302
redir @fallback /en 302
redir @de_before_en /de/ 302
redir @en_before_de /en/ 302
redir @de_only /de/ 302
redir @fallback /en/ 302

redir /index_en /en 301
redir /network /de/map 301
redir /index_en /en/ 301
redir /network /de/map/ 301
redir /contact /de/contact/ 301
redir /contact_en /en/contact 301
redir /download /de/downloads 301
redir /participate/ /de/participate 301
redir /p /de/participate 301
redir /impressum /de/impressum 301
redir /wiki /de/wiki 301
redir /meshwiki /de/wiki 301
redir /contact_en /en/contact/ 301
redir /download /de/downloads/ 301
redir /participate/ /de/participate/ 301
redir /p /de/participate/ 301
redir /impressum /de/impressum/ 301
redir /wiki /de/wiki/ 301
redir /meshwiki /de/wiki/ 301

file_server
}
Expand All @@ -64,50 +64,50 @@ freifunk.dev {
path_regexp branch ^\/([[:alnum:]]+)(\/$|$)
}

redir @de_before_en /{re.branch.1}/de 302
redir @en_before_de /{re.branch.1}/en 302
redir @de_only /{re.branch.1}/de 302
redir @fallback /{re.branch.1}/en 302
redir @de_before_en /{re.branch.1}/de/ 302
redir @en_before_de /{re.branch.1}/en/ 302
redir @de_only /{re.branch.1}/de/ 302
redir @fallback /{re.branch.1}/en/ 302

@index_en {
path_regexp branch ^\/([[:alnum:]]+)\/index\_en
}
redir @index_en /{re.branch.1}/en 301
redir @index_en /{re.branch.1}/en/ 301

@network {
path_regexp branch ^\/([[:alnum:]]+)\/network
}
redir @network /{re.branch.1}/de/map 301
redir @network /{re.branch.1}/de/map/ 301

@contact {
path_regexp branch ^\/([[:alnum:]]+)\/contact
}
redir @contact /{re.branch.1}/de/contact 301
redir @contact /{re.branch.1}/de/contact/ 301

@contact_en {
path_regexp branch ^\/([[:alnum:]]+)\/contact_en
}
redir @contact_en /{re.branch.1}/en/contact 301
redir @contact_en /{re.branch.1}/en/contact/ 301

@download {
path_regexp branch ^\/([[:alnum:]]+)\/download
}
redir @download /{re.branch.1}/de/downloads 301
redir @download /{re.branch.1}/de/downloads/ 301

@participate {
path_regexp branch ^\/([[:alnum:]]+)\/(participate|p$)
}
redir @participate /{re.branch.1}/de/participate 301
redir @participate /{re.branch.1}/de/participate/ 301

@impressum {
path_regexp branch ^\/([[:alnum:]]+)\/impressum
}
redir @impressum /{re.branch.1}/de/impressum 301
redir @impressum /{re.branch.1}/de/impressum/ 301

@wiki {
path_regexp branch ^\/([[:alnum:]]+)\/(meshwiki|wiki)
}
redir @wiki /{re.branch.1}/de/wiki 301
redir @wiki /{re.branch.1}/de/wiki/ 301

file_server
}

0 comments on commit 3214d3d

Please sign in to comment.