aureliojargas / aurelio.net

Sources for Aurelio.net website
26 stars 6 forks source link

Create /foo → /foo/ redirects for all folders #34

Closed aureliojargas closed 6 years ago

aureliojargas commented 6 years ago

As explained in #20, Netlify serve two URLs for each folder: with and without the trailing slash.

The relative path problem I'll fix in that issue, but it's still annoying two have this behavior (and might be bad for SEO).

I've contacted Netlify support for a solution, but for now I can make a workaround hardcoding 301 redirects for all folders of my site in the _redirects file.

aureliojargas commented 6 years ago

Also, I'll need a script to check if any folder is not on this redirect list.

aureliojargas commented 6 years ago

Workaround done and tested.

aureliojargas commented 6 years ago

Well, as it turns out, it was a bug on Netlify, caused by the asset optimization feature (I used that to minify and bundle the CSS files). Just deactivated that and the folder redirects started to work. So I reverted all the work here and now everything is fine. 👍