WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

Du bist nicht angemeldet.

#1 31.03.2017 07:54:09

florian
Administrator

SSL/TLS & WBCE

- german text below -

There was a short conversation on GitHub regarding issues with WBCE in a SSL-secured environement.
https://github.com/WBCE/WebsiteBaker_Co … issues/243

Generally spoken: WBCE works with SSL with no problems.

- If you install a new instance of WBCE and your webspace supports SSL, be sure that you point your browser to https://yourdomain.tld when installing WBCE, so the SSL secured URL will be used for installation automatically.

- If you activate SSL for an existing website, you just have to change the defined WB_URL in the config.php of your WBCE instance from http://yourdomain.tld to https://yourdomain.tld.
(Edit/Ann.: If the site is very old and/or large, it may be necessary to correct links to images or other pages which are stored with the "old" absolute domain in the database. This is a bit tricky. You have to create a SQL dump, open the file with a text editor like Notepad++, search/replace all instance of http:/ /yourdomain.tld with https:/ /yourdomain.tld and re-import the changed dump into your database.)

I have a bunch of WBCE sites for which I activated SSL, and on none of them I had trouble with it which was caused by WBCE.
The trap is that SSL often works only for https:/ /www.domain.tld and not for https:/ /domain.tld and vice versa, so be sure that you use the right path when installing WBCE and add an URL rewrite to yout htaccess which forces (not) to use www.

(Note: the blank between the two slashes is only to avoid this forum software creating links from the URLs. You have to write the URL of course as usual without space!)

- deutsch -
Es gab eine kurze Unterhaltung auf Github zum Thema WBCE und SSL.
https://github.com/WBCE/WebsiteBaker_Co … issues/243

Um es kurz zu machen: WBCE läuft mit SSL-verschlüsselten Verbindungen ohne Probleme.

- Bei einer Neuinstallation ist darauf zu achten, das Installationsscript von https://yourdomain.tld aufzurufen, so wird dann gleich die https-URL in der config.php verwendet.

- Nach der https-Umstellung einer bestehenden Website muss einfach nur in der config.php der betr. WBCE-Installation  die Angabe bei WB_URL von http://yourdomain.tld auf https://yourdomain.tld geändert werden.
(Anmerkung/Ergänzung: Falls die Seite sehr alt und/oder umfangreich ist, kann es sein, dass in der Datenbank bei Verlinkungen zu Bildern oder anderen Seiten des Auftritts noch die absoluten "alten" Pfade mit http statt https hinterlegt sind. In diesem Falle ist das Vorgehen ein bisschen komplizierter, d.h. Datenbankdump anlegen - SQL-Datei mit Notepad++ o.ä. öffnen - alle Vorkommen von http:/ /domain.tld durch https:/ /yourdomain.tld ersetzen - geänderten SQL-Dump zurückspielen.)

Ich habe jetzt schon ein paar Websites auf https umgestellt oder neuinstalliert, und hatte damit keine Probleme - jedenfalls keine, die von WBCE verursacht worden wären. Der Fallstrick liegt vielmehr in der Konfiguration des Zertifikats, das meistens entweder nur für https:/ /www.domain.tld und nicht für https:/ /domain.tld ausgestellt ist bzw. umgekehrt. Es ist also darauf zu achten, dass die WBCE-Website die richtige URL verwendet; auch sollte dann in der .htaccess ein Rewrite auf die Domain mit bzw. ohne www (je nachdem, für welche URL das Zertifikat ausgestellt ist)  erfolgen.

(Anmerkung: Der Leerschritt zwischen den Schrägstrichen in den o.g. URLs ist nur dazu da, damit hier im Text keine automatischen Links generiert werden. Natürlich muss die URL wie gewohnt OHNE Leerschritt angegeben werden!)

htaccess für URL immer mit www:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain.tld$ [NC]
RewriteRule ^(.*)$ https://www.domain.tld/$1 [R=301,L]

Beitrag geändert von florian (31.03.2017 08:12:09)


Code allein macht nicht glücklich. Jetzt spenden!

Offline

#2 06.05.2017 09:23:30

better-work
Mitglied

Re: SSL/TLS & WBCE

So hier nun mit kleiner Erklärung dabei...

RewriteEngine On

# Sorgt dafuer das die Seite nur mit https://www.domain.tld aufgerufen werden kann
RewriteCond %{HTTP_HOST} !^www\.domain\.tld$ [NC]
RewriteRule ^(.*)$ https://www.domain.tld/$1 [L,R=301]

P.S.:

Ich weiß nicht ob diese Version noch "gültig"  ist (unter SEO Gesichtspunkten), Sie funktioniert jedenfalls....

# Alle (!!!) Anfragen ohne www. und ohne https:// werden dauerhaft auf https://www. umgeleitet!!!
# Der ,L Parameter weist an die Bearbeitung ueber mod_rewrite zu beenden
# und gehoert daher an das Ende der Umleitung
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.      [NC]
RewriteRule ^(.*)        http://www.%{HTTP_HOST}/$1   [R=301]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Beitrag geändert von better-work (09.06.2017 12:42:12)


Gruß Jörg

Offline

Liked by:

nickfake

Fußzeile des Forums

up