Auto-generate .htaccess files for specific folders? #2543
-
|
I have a portfolio website with several projects (each a page) and two global data files listing these projects:
Question: Is there any easy way to make eleventy copy a .htaccess file into the folders listed in the projects_unlisted.json, so these (and only these) can only be accessed when having a log-in and password? The .htaccess file can be the same for all unlisted projects, something like this: My projects.json and projects_unlisted.json look both the same, like this: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
|
Easiest ways to add an .htaccess file are probably just using passthrough file copy or you could create an .htaccess.njk file and set a |
Beta Was this translation helpful? Give feedback.
Easiest ways to add an .htaccess file are probably just using passthrough file copy or you could create an .htaccess.njk file and set a
permalink: unlisted/.htaccessfront matter key for that template.