Skip to content

Support for single page applications route all requests to index.html.

Problem to Solve

When routing requests to Gitlab Pages, if there is no default index.html, the request renders an error that does not permit SEO or support of SPA on GitLab Pages.

Solution

Route all requests to GitPages to /index.html by:

  • implementing a route single page app to index.html to a checkbox in Pages > Settings
  • Enable SPAs to serve any accompanying files so that it works
  • Ensure existing files are served before trying to serve index.html

Update 2021-07-20

Closing this issue in favor of #57. We aim to enable SPAs via a new .gitlab-pages.yml

Edited by Kevin Chu