oxedion's issue with DokuWiki is now solved. Partially by using the default
.htaccess distributed by DokuWiki and his hosting companies decision to support
LetsEncrypt (free https certificates).
For those searching for a solution to similar problems:-
Note: if you have root access to your webserver avoid using
.htaccess as it causes a performance hit, and use
Directory declarations in you webserver configuration files instead - which allow
all the same options as
.htaccess
1. copy
.htaccess.dist to
.htaccess in the root directory of your DokuWiki (Linux CLI:
cp .htaccess{.dist,})
2. inspect .htaccess and modify if necessary by reading the comments (Linux CLI:
nano .htaccess, then, if you made changes,
F2, then
y). Refer to the DokuWiki pages about
security,
rewrite, and
https secure login.
3. set the permissions of
.htaccess to 644 - read and write by the webserver, read only by group and others (Linux CLI:
chmod 644 .htaccess)
* If you want to force all traffic to use HTTPS add the following to your
.htaccess or webserver configuration file (Note that www. is a subdomain of your main site):-
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
[/color]