Skip to content
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

Fix redirects #649

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Fix redirects #649

merged 1 commit into from
Jun 22, 2022

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Jun 22, 2022

Since we're now serving the website fully statically, we need to use
meta redirects rather than relying on our server configuration.

Since we're now serving the website fully statically, we need to use
meta redirects rather than relying on our server configuration.

Closes #650
Copy link
Member

@Goodwine Goodwine left a comment

Choose a reason for hiding this comment

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

LGTM just one potentially minor comment/question


Dir['source/documentation/breaking-changes/**'].each do |file|
basename = File.basename(file).gsub(/\..*/, '')
redirect "d/#{basename}.html", to: "/documentation/breaking-changes/#{basename}"
Copy link
Member

Choose a reason for hiding this comment

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

Only nitpick is that before some redirects were any /d/whatever to /doc.../break.../whatever, regardless of whether the url was known or not, and now it redirects on known URLs only

(Same on others)

I assume that's intended because it would throw 404 regardless?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These redirects are actually compiled down to HTML pages with <meta http-equiv="refresh"> tags, so we unfortunately can't do wildcard redirects anymore. Otherwise I'd keep them if I could.

@nex3 nex3 merged commit 652e48b into main Jun 22, 2022
@nex3 nex3 deleted the redirects branch June 22, 2022 23:44
@nex3 nex3 mentioned this pull request Jun 27, 2022
asaf400 pushed a commit to asaf400/ass-site that referenced this pull request Apr 18, 2024
Since we're now serving the website fully statically, we need to use
meta redirects rather than relying on our server configuration.

Closes sass#650
asaf400 pushed a commit to asaf400/ass-site that referenced this pull request Apr 18, 2024
Since we're now serving the website fully statically, we need to use
meta redirects rather than relying on our server configuration.

Closes sass#650
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.

None yet

2 participants