From f4cf898ba755ee7feeb5994847d3575e74718cc1 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 9 Nov 2018 23:17:56 +0100 Subject: Add .htaccess * Set web environment variables * Set 404 file * Rewrite `/license-generator` to run the `license-generator.fcgi` program * Rewrite all other requests to look for a .html file with the path as a filename --- .htaccess | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..fd5f7b2 --- /dev/null +++ b/.htaccess @@ -0,0 +1,16 @@ +SetEnv LOG_FILE "license_generator.log" +SetEnv DATABASE_URL "mysql://localhost:3306/dome_key" + + +ErrorDocument 404 /404.html + + +RewriteEngine on + +RewriteRule /?\.htaccess$ - [F,L] + +RewriteRule ^(license-generator) license-generator.fcgi [L] + +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^([^\.]+)$ $1.html [L] -- cgit v1.2.3