diff options
author | Teddy Wing | 2018-11-14 15:14:24 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-14 15:16:25 +0100 |
commit | a65fd703de8799a19ad5a878194d0fe07190f4db (patch) | |
tree | 9e90c8f935ade141a4026d6917cb85d628416786 | |
parent | a9355f139c4960879f1c34a0527bea81ebf29867 (diff) | |
download | dome-key-web-a65fd703de8799a19ad5a878194d0fe07190f4db.tar.bz2 |
.htaccess: Add full FastCGI rewrite rules
Also add some section comments.
Here we point
/license
and
/license/download
to `license.fcgi`, and
/fulfillment
to `fulfillment.fcgi`. The actual FastCGI binaries with the `.fcgi`
extension get redirected to 404 because we already have nicer-looking
URLs for them.
-rw-r--r-- | .htaccess | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -6,13 +6,21 @@ ErrorDocument 404 /404.html RewriteEngine on +# Redirect HTTP to HTTPS RewriteCond %{HTTPS} != on RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] +# Disallow access to .htaccess RewriteRule /?\.htaccess$ - [F,L] -RewriteRule ^(license-generator) license-generator.fcgi [L] - +# Remove .html extension RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.html [L] + +# FastCGI routes +RewriteRule ^(license) license.fcgi [QSA,L] +RewriteRule ^(license/download) license.fcgi [QSA,L] +RewriteRule ^(fulfillment) fulfillment.fcgi [QSA,L] +RewriteRule ^(license.fcgi)$ - [L,R=404] +RewriteRule ^(fulfillment.fcgi)$ - [L,R=404] |