We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

https from http

How Do I?

MINDSCREEN's avatar
MINDSCREEN
218 posts
8 years ago
MINDSCREEN's avatar MINDSCREEN

Hi

We have installed and setup SSL certificate for www.mercatornet.com. Now the problem is when we try to access https://www.mercatornet.com , designs getting corrupted. How would I update http://www.mercatornet.com/ to https://www.mercatornet.com/

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
8 years ago
Ingmar Greil's avatar Ingmar Greil

Basically you’ll simply tell your host to rewrite all access to https. Something like this in your .htaccess:

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80 
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
       
MINDSCREEN's avatar
MINDSCREEN
218 posts
8 years ago
MINDSCREEN's avatar MINDSCREEN

I am using following .htaccess, is that correct:-

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] 
        RewriteBase /

        # Removes index.php from ExpressionEngine URLs
        RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
        RewriteCond %{REQUEST_URI} !/system/.* [NC]
        RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

        # Directs all EE web requests through the site index file
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.