RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} DirectoryIndex index.php index.html index.py AddCharset UTF-8 .txt