ember-learn / ember-learn/guides-source

Improve auto-generated Netlify redirect file

Open
#1,335 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
161
Forks
512
Avg merge
4d 9h
Merged PRs (30d)
4

Description

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](https://community.netlify.com/t/changed-behavior-in-redirects/10084) 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:

```html

```

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](https://github.com/ember-fastboot/fastboot), [prember](https://github.com/ef4/prember), or if this is something that [Guidemaker](https://github.com/empress/guidemaker) should be able to fix.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.