Skip to content

Instantly share code, notes, and snippets.

@rkaneko
Last active December 18, 2015 20:59
Show Gist options
  • Save rkaneko/5844458 to your computer and use it in GitHub Desktop.
Save rkaneko/5844458 to your computer and use it in GitHub Desktop.
Apache config file for converting http request to https request . If user request 80 port access, apache rewrite 443 port access .
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "logs/rewrite_log"
RewriteLogLevel 0
#RewriteLogLevel 1
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment