Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2023-05-06 20:54:51
- BryanA.
- Member
- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Landing on http instead of https
I want to make sure my install lands on the SSL I purchased – mostly it defaults to the http which isn’t covered by the nebulous purchase of the SSL stuff. How do I force or re-enforce the preferred protocol? (I see in the Preferences > Site > Site URL it says the http/https isn’t needed but would it cause trouble if I did add it?)
Voice Actor – starting up a site for that good book stuff.
Offline
Re: Landing on http instead of https
You can specify a directive in your config.php
to always use https://
define('PROTOCOL', 'https://');
Additionally, using a redirect in your .htaccess file, like this (e.g. source or this):
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Add it before the Textpattern predefined directives.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
#3 2023-05-07 16:45:33
- BryanA.
- Member
- From: Maryland, USA
- Registered: 2007-08-12
- Posts: 104
Re: Landing on http instead of https
Super! Thank you. I performed both actions and should add to others that if you’re drafting in http when you switch, the form will return an error when you submit changes to save; but write https in the address bar and your save will go through.
Voice Actor – starting up a site for that good book stuff.
Offline
Pages: 1