From 0f5d4fbe2e6d0affb595b8322b3b7eff6c89d147 Mon Sep 17 00:00:00 2001 From: Yves Gatesoupe Date: Sat, 18 Jul 2020 02:22:53 +0200 Subject: [PATCH] added .htaccess for 404 page --- .eleventy.js | 1 + deploy.js | 5 ++--- src/.htaccess | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 src/.htaccess diff --git a/.eleventy.js b/.eleventy.js index 99f7361..ca83042 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -35,6 +35,7 @@ module.exports = function(config) { config.addPassthroughCopy('src/admin/previews.js'); config.addPassthroughCopy('node_modules/nunjucks/browser/nunjucks-slim.js'); config.addPassthroughCopy('src/robots.txt'); + config.addPassthroughCopy('src/.htaccess'); config.addPassthroughCopy('src/form'); const now = new Date(); diff --git a/deploy.js b/deploy.js index 3af8eb0..974ac5f 100644 --- a/deploy.js +++ b/deploy.js @@ -7,10 +7,9 @@ var config = { password: "password", host: "ftp.someserver.com", port: 21, - localRoot: __dirname + "/local-folder", + localRoot: __dirname + "/dist", remoteRoot: "/public_html/remote-folder/", - // include: ["*", "**/*"], // this would upload everything except dot files - include: ["*.php", "dist/*", ".*"], + include: ["*", "**/*", ".htaccess"], // this would upload everything except dot files // e.g. exclude sourcemaps, and ALL files in node_modules (including dot files) exclude: ["dist/**/*.map", "node_modules/**", "node_modules/**/.*", ".git/**"], // delete ALL existing files at destination before uploading, if true diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000..de377bf --- /dev/null +++ b/src/.htaccess @@ -0,0 +1 @@ +ErrorDocument 404 /404.html