Skip to main content

How to serve a static HTML page on Platform.sh

Comments

2 comments

  • Frédéric Potvin

    Is it possible to remove the trailing slash?

    Unfortunately, it not possible. We use the following Nginx directive try_files $uri $uri/ =404; which is not customizable by users. As explained in the try_file documentation, if Nginx cannot match the URL path as a file it will try to match it as a directory. The path will always match the existing directory whether it ends with a slash or not.

    0
  • Matthias Van Woensel

    There is a way to catch the 404, but it is not officially supported:

    https://community.platform.sh/t/custom-404-page-for-a-static-website/637

    0

Please sign in to leave a comment.