Skip to content

Make redirections to .org match with or without trailing slash and make them case-insensitive#2108

Open
sj213 wants to merge 2 commits into
masterfrom
nginx-redir
Open

Make redirections to .org match with or without trailing slash and make them case-insensitive#2108
sj213 wants to merge 2 commits into
masterfrom
nginx-redir

Conversation

@sj213

@sj213 sj213 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The main problem with the current match expressions for redirecting to .org seems to be that they do not match if the first path component is not terminated by a slash. The regexp matching introduced by this PR should fix this behaviour. In addition, an extra match clause to catch "galaxyproject.eu/eu" has been added. All the newly introduced regexp matches are case insensitive, so "EU", "Belgium" etc are also included.

CAVEAT EMPTOR: These expressions have been constructed according to the nginx manual but are completely untested

also make these matches case-insensitive.
@sj213 sj213 requested a review from bgruening June 1, 2026 09:15

@bgruening bgruening left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itisAliRH let me know when you are ready and we can merge that

@sj213

sj213 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

On second thought: the REs used in these rules should probably all be terminated with $. Currently, the rule redirecting /eu would also match /eutrophy and the rule matching /ifb would also match /ifbanner... Ok, these URLs are not bloody likely, but you get the idea and this is just the kind of underspecific match that is prone to bite you years later when this PR has long slipped from the group's collective memory...

Should I update this PR accordingly?

@bgruening

Copy link
Copy Markdown
Member

Yes, please do so. Thanks!

@sj213

sj213 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants