From 5f5f023afc85716d462c1d989699dbc50f9009a8 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Tue, 10 Feb 2026 23:06:08 +0000 Subject: [PATCH] Adding Netherlands redirect --- .../elasticbeanstalk/00_application.conf | 14 +++++++++++++ tests/TestRedirect.py | 21 +++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf index 538b581..bf983af 100644 --- a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf +++ b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf @@ -32,6 +32,20 @@ rewrite /api/presentation/validator/service(.*)$ https://presentation-validator. rewrite ^/model/shared-canvas(.*)$ https://iiif.io/api/model/shared-canvas$1 permanent; rewrite /img/logo-iiif-34x30.png$ https://iiif.io/assets/uploads/logos/logo-iiif-34x30.png redirect; +location '/event/2026/netherlands/' { + rewrite ^ 'https://conference2026.iiif.io/' permanent; +} + +location '/event/2026/netherlands/cfp/' { + rewrite ^ 'https://conference2026.iiif.io/cfp/' permanent; +} +location '/event/2026/netherlands/sponsorship/' { + rewrite ^ 'https://conference2026.iiif.io/sponsors/' permanent; +} + +location '/event/2026/netherlands/scholarship/' { + rewrite ^ 'https://conference2026.iiif.io/travel-scholarship/' permanent; +} #rewrite /api/image/.*/example/.*$ https://iiif.io/comingsoon/ redirect; diff --git a/tests/TestRedirect.py b/tests/TestRedirect.py index 20f4a29..77a397a 100755 --- a/tests/TestRedirect.py +++ b/tests/TestRedirect.py @@ -122,6 +122,27 @@ def test_iiiflogo(self): self.checkRedirect(url, dest, True, target_code=302) + def test_nertherlands(self): + # https://iiif.io/event/2026/netherlands/ -> https://conference2026.iiif.io/ + url = f'{self.baseurl}/event/2026/netherlands/' + dest = 'https://conference2026.iiif.io/' + self.checkRedirect(url, dest, True, target_code=301) + + # https://iiif.io/event/2026/netherlands/cfp/ -> https://conference2026.iiif.io/cfp/ + url = f'{self.baseurl}/event/2026/netherlands/cfp/' + dest = 'https://conference2026.iiif.io/cfp/' + self.checkRedirect(url, dest, True, target_code=301) + + # https://iiif.io/event/2026/netherlands/sponsorship/ -> https://conference2026.iiif.io/sponsors/ + url = f'{self.baseurl}/event/2026/netherlands/sponsorship/' + dest = 'https://conference2026.iiif.io/sponsors/' + self.checkRedirect(url, dest, True, target_code=301) + + # https://iiif.io/event/2026/netherlands/scholarship/ -> https://conference2026.iiif.io/travel-scholarship/ + url = f'{self.baseurl}/event/2026/netherlands/scholarship/' + dest = 'https://conference2026.iiif.io/travel-scholarship/' + self.checkRedirect(url, dest, True, target_code=301) + if __name__ == '__main__': baseurl = 'http://localhost:5000' if len(sys.argv) == 2: