-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plain text _header and _redirect Netlify config files are being saved as index.html files #138
Comments
Hi @sr293, since _redirects is a file, not an URL, if I place it under "Additional Files and Directories" it works as intended. Was that set as well there or as "Additional URL"? |
I used the Additional Files and Directories setting and it did not work. The files were unfortunately renamed. In this example I'm using Local by Flywheel to more closely match your test example. In your screenshot it appears to be working how I would want it to. Is there some other setting I should change or update? Here is the debug log export from my test. |
I couldn't replicate it now with the next release (tested on Linux + Mac with LocalWP) and exported it as ZIP and Local Directory. I also switched to multiple locations for the export to be sure it's not an edge case from the path itself. So as long as these files are included in Simply Static -> Settings -> Include/Exclude -> Additional Files and Directories, that should work well. There might be some issues from the filesystem that we can't replicate (maybe a .htaccess file blocks placing files in the root?), but nothing is blocking from within Simply Static anymore (next release). |
That's great news! When do you expect the new version with the fix to be released? I'm currently using version 2.3.0. |
Great to hear, we're manually copying these files in now for Cloudflare Pages |
@patrickposner you mentioned this was fixed in the next release, but the bug still exists on version 2.3.1. Any update on this? |
Has this issue been fixed, I'm finding _redirects being converted into /_redirects/index.html
|
Is there any update on this issue? |
Hi @derekperkins. Since this is still an unresolved issue in Simply Static, how were/are you copying the files manually into Cloudflare Pages? |
@isatisfy The only way I've got it to work is to unzip the simplystatic folder and then rename the _/redirects/index.html file to _redirects and move it into the root (out of the _/redirects/ folder). I then upload the whole simplystatic export. |
Sorry for the late reply, but we do exactly what @rpardz suggested. We're working through some issues with the GitHub integration, and my hope is that we can add those files there, so we don't have to keep manually copying them. |
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:
The redirect file in root with no file extension:
Generated folder and index.html from file:
Site info from test site:
siteinfo.txt
The text was updated successfully, but these errors were encountered: