-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
When including a plain text config file with no extension for compatible services (Netlify, Gitlab Pages, Cloudfront Pages, etc.) the file is being treated like an HTML page which is producing an incorrect filename.
Example:
~/_redirects gets changed to ~/_redirects/index.html
It appears to be treated like an HTML page endpoint and not a file. When a file extension is present, like on ~/robots.txt, the generated file works as expected.
Steps to replication:
- Create a WordPress site and install the simply-static plugin
- Add a plain text file called _redirects with any text content to your document root so that it's visible at example.com/_redirects (example file)
- Include the _redirects URL in the simply static includes list in /wp-admin/
- Generate a static site
- The generated site will save the file as _redirects/index.html instead of _redirects, and because of the changed filename, the file won't be recognized as a configuration file by platforms like Netlify, Gitlab pages, etc.
The redirect file in root with no file extension:

Generated folder and index.html from file:

Site info from test site:
siteinfo.txt
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working