diff options
author | Teddy Wing | 2018-11-09 23:17:56 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-09 23:17:56 +0100 |
commit | f4cf898ba755ee7feeb5994847d3575e74718cc1 (patch) | |
tree | f13f2cdda2e6c3d5c276bb6c13f98d315903eecf | |
parent | 083f59f251207846eec5c703e90d7f176704dec0 (diff) | |
download | dome-key-web-f4cf898ba755ee7feeb5994847d3575e74718cc1.tar.bz2 |
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
-rw-r--r-- | .htaccess | 16 |
1 files changed, 16 insertions, 0 deletions
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] |