Oct
          19
          2015
        
          By abernal          
              
       
    From HTTP to HTTPS
In order to serve a domain only through the HTTPS protocol, we must follow these steps:
Required data
- domain = domain name
 
Sample data
- domain = www.gafoac.com
 
Process
1. Append the next string to the .htaccess file
   # Redirect to HTTPS
   RewriteCond %{HTTPS} off
   RewriteCond %{HTTP:X-Forwarded-Proto} !https
   RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]2. Make sure that the setting.php (sites/default/setting.php) file is compatible with the change (https)
$base_url = 'https://www.gafoac.com';
From HTTPS to HTTP
In order to serve a domain only through the HTTP protocol, we must follow these steps:
Required data
- domain = domain name
 
Sample data
- domain = www.gafoac.com
 
Process
1. Append the next string to the .htaccess file
   # Redirect to HTTP
   RewriteCond %{HTTPS} on
   RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]2. Make sure that the setting.php (sites/default/setting.php) file is compatible with the change (http)
$base_url = 'http://www.gafoac.com';