Textpattern CMS support forum

You are not logged in. Register | Login | Help

#41 2018-09-06 17:07:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,435
Website

Re: http to https in textpattern

what a pleasure to install an LE certificate in 2 clicks and 10 seconds!

Same with “all-inkl” in Germany :-)

TXP Builders – finely-crafted code, design and txp

Offline

#42 2018-09-06 20:06:38

gaekwad
Admin
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 2,482

Re: http to https in textpattern

Lots of UK hosts offer Let’s Encrypt! via their control panel and it takes a few seconds. It’s been interesting watching the hosts change tack over the last few years as these free alternative challenges their pay-for cert options in many cases.

…but then if they were resistant to free and open https, that’d be slow commercial suicide. Adapt or die, I guess.

Offline

#43 2018-09-07 01:46:38

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,449
Website

Re: http to https in textpattern

webfaction.com is still out to lunch on this issue


…. texted postive

Offline

#44 2018-09-13 15:14:03

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,449
Website

Re: http to https in textpattern


…. texted postive

Offline

#45 2018-09-13 18:41:57

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,193
Website

Re: http to https in textpattern

bici wrote #314002:

Released today ! Yay !

?

So much for needing to write those instructions. I’ll take it.


The text persuades, the *notes prove。

Offline

#46 2018-09-13 19:08:18

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 7,246
Website

Re: http to https in textpattern

At last!


Yiannis
——————————
neme.org | hblack.net | LABS | State Machines | Respbublika! | NeMe @ github

Offline

#47 2018-09-28 11:49:58

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 740
Website

Re: http to https in textpattern

jakob wrote #311998:

Thank you Jakob … nice to have found your great post.

Step 1: add this line to your config.php:

define('PROTOCOL', 'https://');...

How exactly, something like this?

<?php
$txpcfg['site_url'] = define('PROTOCOL', 'https://');
?>

[edit] It seems the above snippit is correct … :o

And with this in the .htaccess file:

# Class B (no www) redirects > 
	RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
	RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

… everything you type into the address bar gets this url “https://tvdiever.nl” … and that’s nice … :))

Nevertheless … how to change the .htaccess snippit to redirect everything to “https://www.tv.diever.nl”?

Last edited by RedFox (2018-09-28 12:27:09)

Offline

#48 2018-09-28 15:04:23

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,435
Website

Re: http to https in textpattern

Hi Redfox,

no all you need to add is:

define('PROTOCOL', 'https://');

on a single line to your config.php. The constant PROTOCOL will then be used everywhere else in Textpattern.

I think that class B thing comes from Destry as I hadn’t heard that terminology before. Check the HTML Boilerplate htaccess file. That has alternative redirect instructions for with and without www. You can also manually put https://www. in your redirect above.


TXP Builders – finely-crafted code, design and txp

Offline

#49 2018-09-29 13:42:31

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 740
Website

Re: http to https in textpattern

jakob: after more info from the internet and the provider … all addresses (tvdiever.nl; www.tvdiever.nl; http://tvdiever.nl; http://www.tvdiever.nl) are redirected to https://www.tvdiever.nl with this in the config.php file (thank you!) >

<?php
define('PROTOCOL', 'https://');
?>

… and with this in the .htaccess file >

# #helpdesk.mijndomein.nl/.. > https://is.gd/3CdnFt 
RewriteBase /
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# #www.inmotionhosting.com/.. > https://is.gd/8q0QaG
RewriteCond %{HTTP_HOST} ^tvdiever.nl [NC]
RewriteRule ^(.*)$ https://www.tvdiever.nl/$1 [L,R=301,NC]

:))

Last edited by RedFox (2018-09-29 13:48:37)

Offline

#50 2018-10-02 07:50:54

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,193
Website

Re: http to https in textpattern

jakob wrote #314210:

class B thing comes from Destry as I hadn’t heard that terminology before.

To set the record straight on this…

‘No-WWW’ was a campaign started in March 2003. The site made very few blog posts in its lifetime because it didn’t need to have much. Here’s a grab from 2013, showing all posts up to the last one in December 2012. The site went offline sometime after April 2016.

The earlier posts make the argument about not needing ‘www’ on URLs and provide that set of mod_rewrite rules. Their argument made a lot of sense to me by the time I found it in 2005 or so, notably the parts about usability and indexing redundancy (if you didn’t point one way or the other specifically), and I stuck with it ever since without much thinking about it. I noted over the years a lot of the digerati opted against ‘www’ too, including Textism.

I don’t think it matters on a technological level whether you use one or the other. The important thing is you decide which to use and stick with it.

However, I was just reading this, To www or not www, which talks about passing cookies down to subdomains from the ‘origin’ (a useful term). I don’t really follow what he’s talking about, but I’d like to grasp it better in case it concerns me, as I have tended to favour more use of subdomains over buying different domains as a way to keep overhead costs down. His article argues for using ‘www’, but if you read down into the comments, he later changes his mind and decides to keep no www (Class B).

Ultimately I like no www for being less crufty and easier to read/use; ‘www’ just seems like pointless, redundant, irrelevant, geeknoobspeak. I remember TBL, or whoever it was responsible, once saying he regretted using the // in URLs too, that it was completely unnecessary, but now has become so after the infrastructure changes, or whatever. Boo.

I would have liked https:wion.com


The text persuades, the *notes prove。

Offline

Board footer

Powered by FluxBB