Skip to content
Snippets Groups Projects
Commit d24c3e81 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

fix(nginx): Remove unneeded election candidate URL mapping from conf file

parent bb550f9c
No related branches found
No related tags found
1 merge request!308update: migrate elections section to hugo
Pipeline #68039 passed
# Has to be outside of server blocks by convention - for elections rewrites 2025
map $arg_id $id_new_destination {
'corsaro' /org/elections/2025/corsaro;
'ebbers' /org/elections/2025/ebbers;
'khouzam' /org/elections/2025/khouzam;
'koenigseder' /org/elections/2025/koenigseder;
'lambert' /org/elections/2025/lambert;
'matheis' /org/elections/2025/matheis;
'merks' /org/elections/2025/merks;
'piana' /org/elections/2025/piana;
}
server {
listen 8080;
server_name localhost;
......@@ -18,21 +6,6 @@ server {
error_page 404 /404.html;
error_page 403 /404.html;
# Needs to be outside of location blocks due to special mapping
location /org/elections/candidate.php {
error_page 420 = @id_redirects;
if ( $args ~ "id=" ) { return 420; }
return 301 /org/elections/nominees;
}
location @id_redirects {
if ($id_new_destination) {
return 301 $id_new_destination;
}
return 301 /org/elections/nominees;
}
location / {
# Configure redirect for /resources but omit /resources/marketplace
if ($request_uri ~ ^/resources/(?!marketplace)(.*)$) {
......@@ -262,6 +235,9 @@ server {
location = /org/elections/nominees.php {
return 301 https://$host/org/elections/nominees;
}
location = /org/elections/candidate.php {
return 301 https://$host/org/elections/nominees;
}
location = /org/elections/election_process.php {
return 301 https://$host/org/elections/election-process;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment