.htaccess

DirectoryIndex /deliver.php

###### OPTIONAL CONFIGS ######
#php_value upload_max_filesize 10M
#php_value post_max_size 13M

RewriteEngine On


# force HTTPS except on localhost
RewriteCond %{HTTP_HOST} !=localhost
RewriteCond %{HTTP_HOST} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=127.0.0.1
RewriteCond %{REMOTE_ADDR} !=::1
RewriteCond %{HTTPS} off
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# force www except on localhost
# RewriteCond %{HTTP_HOST} !=localhost
# RewriteCond %{HTTP_HOST} !=127.0.0.1
# RewriteCond %{REMOTE_ADDR} !=127.0.0.1
# RewriteCond %{REMOTE_ADDR} !=::1
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


# deliver all requests to deliver.php
RewriteCond %{REQUEST_URI} !^/deliver.php$
RewriteRule (.+) /deliver.php [L,QSA]