Options -indexes

ErrorDocument 403 /error.html
ErrorDocument 404 /error.html
#AddType application/x-httpd-php5 .pdf

RewriteEngine on

# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
# Redirect to https version
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# other rewrite rules
RewriteRule ^login/?$                   login.php [L]
RewriteRule ^logout/?$                  logout.php [L]
RewriteRule ^sms/?$                     sms.php [L]
RewriteRule ^print.pdf                  print.php [L]
RewriteRule ^shuffle/?$                 index.php?shuffle [L]
RewriteRule ^shuffle/confirmed/?$       index.php?shuffle&confirmed [L]
RewriteRule ^shuffle/done/?$            index.php?shuffle&done [L]
RewriteRule ^clear/?$                   index.php?clear [L]
RewriteRule ^clear/confirmed/?$         index.php?clear&confirmed [L]
RewriteRule ^clear/done/?$              index.php?clear&done [L]
RewriteRule ^add/?$                     add.php [L]
RewriteRule ^spoon/([^/.]+)/?$          index.php?spoon=$1 [L]
RewriteRule ^revive/([^/.]+)/?$         index.php?revive=$1 [L]