Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

htaccess redirect to https

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^yourdomain.com [OR]
RewriteCond %{HTTP_HOST} ^www.yourdomain.com
RewriteRule .* https://yourdomain.com%{REQUEST_URI} [R=301,L]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #htaccess #redirect #https
ADD COMMENT
Topic
Name
7+3 =