ember-learn / guides-source

This repository contains the Ember.js Guides
https://guides.emberjs.com/
MIT License
158 stars 495 forks source link

Improve auto-generated Netlify redirect file #1335

Open mansona opened 4 years ago

mansona commented 4 years ago

Recently we got an email from netlify saying that they are changing the behaviour of the redirects.

Currently, if you have a redirect defined as follows:

/v3.16.0/object-model/computed-properties /release/components/component-state-and-actions

and you also have an index file in the location:

/v3.16.0/object-model/computed-properties/index.html

Netlify will ignore the file, and will respond with a 301 redirect to /release/components/component-state-and-actions. Apparently this behaviour was a bug and the intended behaviour was to ship the file if it exists. More information can be read in their blog post about the issue.

Myself and @locks have checked our build output from Guidemaker and it looks like we do generate files in these locations so we will be affected. On further inspection, however, it looks like the generated files have the correct redirect information in them:

<meta http-equiv="refresh" content="0;url=/v3.16.0/components/component-state-and-actions">
<link rel="canonical" href="/v3.16.0/components/component-state-and-actions" />

This means that a user will not notice any difference after Netlify changes the default behaviour.

We think however that it's probably best to make sure that we only have the netlify redirect and not the generated index.html file in our current setup. It's not clear if this is something that we should be able to configure in fastboot, prember, or if this is something that Guidemaker should be able to fix.

MelSumner commented 4 years ago

@mansona can you outline what the action steps are here? I think you're saying that we shouldn't have an index.html file but that doesn't seem feasible.