<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
</IfModule>
Created
September 7, 2017 13:03
-
-
Save tajidyakub/089c8fa7eda614ed17dfb1d802276ff2 to your computer and use it in GitHub Desktop.
Rewrite module apache di .htaccess untuk melakukan redirect non https ke https dan non www ke www
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment