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

How Do I?

evegate94's avatar
evegate94
2 posts
6 years ago
evegate94's avatar evegate94

What’s the best way to redirect to HTTPS. I added the following code to the htaccess file which worked but when I logged in to the styling to the cpanel was missing. If I use this way how do I get the cpanel to style or is there a better way of doing through expressionengine?

http://http://RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\.net
RewriteRule ^(.*)$ https://www.example.net/$1 [R,L]
       
travisb's avatar
travisb
171 posts
6 years ago
travisb's avatar travisb

You could try:

# force secure
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
       
evegate94's avatar
evegate94
2 posts
6 years ago
evegate94's avatar evegate94

Thanks I eventually solved it by using my original code but repointing in the CMS the URL to the Control Panel index page and the themes folder to HTTPS version

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

192.168.0.1

       

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.