GitLab Pages DirectoryIndex support is lacking (file types xhtml, xml)
Summary
GitLab Pages does not allow index.xhtml or index.xml files as a DirectoryIndex
and shows a 404 (or 401) instead.
The severity may fit "Feature Request" here, but since this works on GitHub Pages, I'd really like it to work here, as well.
So since this may disallow me to migrate existing pages, I'll file this as bug.
Steps to reproduce
Create a GitLab pages project, and use an index.xhtml
or index.xml
file instead of index.html
.
Example Project
I've created a test project, here for GitLab: https://nyov.gitlab.io/staticpagetest/
and the same pushed to GitHub here: https://nyov.github.io/staticpagetest/
When browsing the GitLab directories, only the index.html
file under html/
is served as index,
while the directories xhtml/
and xml/
return a 404 Error Page.
When clicking the direct link to these index files, all are served correctly.
Browsing the equivalent GitHub pages, visiting the directories xhtml/
and xml/
serves the index files.
The (identical) sources are here https://gitlab.com/nyov/staticpagetest and here https://github.com/nyov/staticpagetest respectively.
Possible fixes
Allow index.xhtml
files with content-type application/xhtml+xml
in DirectoryIndex
directive (or equivalent).
Allow index.xml
files with content-type application/xml
in DirectoryIndex
directive (or equivalent).
Additionally, perhaps serve .xsl
files with content-type application/xslt+xml
(in accordance with the W3C recommendation). Though GitHub also serves them as application/xml
currently and it seems to work fine.
Many thanks!