From: Raphaƫl Gertz Date: Mon, 24 Sep 2018 16:09:03 +0000 (+0200) Subject: Redirect every requests on index.bin X-Git-Tag: 2.4.38-6~13 X-Git-Url: https://git.rapsys.eu/ihttpd/commitdiff_plain/7216378ff354deb2d32bd7b1b29d7cc2c178f622?ds=sidebyside Redirect every requests on index.bin --- diff --git a/SOURCES/ihttpd.conf b/SOURCES/ihttpd.conf index beadf23..38f0c01 100644 --- a/SOURCES/ihttpd.conf +++ b/SOURCES/ihttpd.conf @@ -62,16 +62,30 @@ SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLSessionCache shmcb:/run/ihttpd/ssl_scache(512000) SSLProtocol all -SSLv3 -# Redirect to https +# Enable rewrite RewriteEngine On + +# Redirect to https RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] +# Redirect unexisting documents to script +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule .* /index.bin [L] + # SSL vhost + # Enable ssl SSLEngine on SSLCertificateFile /etc/pki/tls/certs/ihttpd.pem SSLCertificateKeyFile /etc/pki/tls/private/ihttpd.pem + + # Inherit rewrite config + RewriteEngine On + RewriteOptions Inherit + + # Set custom log CustomLog "/run/ihttpd/log/https.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"