-
Notifications
You must be signed in to change notification settings - Fork 4
Make redirect htaccess map #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: pipeline
Are you sure you want to change the base?
Make redirect htaccess map #45
Conversation
@olinux can you take it from here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This already looks very good - we need to see how we can "transfer" the htaccess file to the FTP server as part of the pipeline still.
that sounds hard |
…and add generic redirect rule
requests should be added in requirements.txt |
page_path = f"instance_libraries/terminologies/{inst_type}.html" | ||
|
||
anchor = _anchorize(filename) | ||
uri = f"/instances/{inst_type}/{filename}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uri = f"/instances/{inst_type}/{filename}" | |
if inst_type in ["Licenses", "contentTypes"]: | |
uri = f"/instances/{inst_type}/{filename}" | |
elif inst_type == 'terminologies': | |
uri = f"/instances/{subdir}/{filename}" | |
elif inst_type == 'parcellationEntities': | |
uri = f"/instances/parcellationEntity/{filename}" | |
elif inst_type == 'brainAtlases': | |
uri = f"/instances/brainAtlas/{filename}" | |
else: | |
uri = f"/instances/{inst_type[:-1]}/{filename}" |
Hi @Raphael-Gazzotti , I don't really have more time to work on this, but feel free to take this over |
It produces a JSON file named `redirect_map.json` in the project root, e.g. | ||
|
||
"/types/Subject": "https://openminds.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It produces a JSON file named `redirect_map.json` in the project root, e.g. | |
"/types/Subject": "https://openminds.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject" | |
It produces a file named `.htaccess` in the project root, e.g. | |
Redirect 301 "/types/Subject" "https://openminds.docs.om-i.org/en/latest/schema_specifications/core/research/subject.html#subject" |
in response to #44