OpenTechSchool / websitenext

OpenTechSchool website
https://www.opentechschool.org
8 stars 6 forks source link

/foundation/ shows file listing instead of redirecting #132

Closed xMartin closed 4 years ago

xMartin commented 4 years ago

This is related to Zeit.co hosting and there is no easy fix.

Read https://github.com/zeit/now/issues/3491#issuecomment-580269459 to understand that with redirects we cannot do this as long as /public/foundation exists. It would work with the more powerful but deprecated "routes" configuration but that doesn't provide an easy way to configure trailing slash behavior (https://github.com/zeit/docs/issues/563) and is generally more verbose. Also note that you cannot combine "routes" and other ways of configuration.

A solution would be to move all downloads to /public/files/, e.g. /public/files/foundation/archive/*.pdf and redirect the old path as well.