RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} DirectoryIndex index.php index.html Order allow,deny Deny from all AddCharset UTF-8 .txt