Including static files with no extension
-
How do I include static files that have no file extension?
_redirects and _headers files are used by Netlify, Cloudflare Pages, etc to server side rules.
~/_redirects
to set server side redirect rules
~/_headers
to set server side header rulesThe debug log shows that the content type is being detected correctly, but since these files don’t have file extensions they are being treated like html pages https://plugins.trac.www.ads-software.com/browser/simply-static/tags/2.2.7/src/class-ss-url-fetcher.php#L181
and that is producing filenames not recognized by those platforms:
~/_redirects/index.html
~/_headers/index.html
How can I include these and other files while keeping the filenames the same? Is there a filter I can use, or something else?
- The topic ‘Including static files with no extension’ is closed to new replies.