Not logged in. · Lost password · Register
Forum: General Help and Support Installation and Configuration RSS
Redirecting HTTP to HTTPS
Avatar
rasca0027 #1
Member since Dec 2018 · 2 posts · Location: Brooklyn, NYC
Group memberships: Members
Show profile · Link to this post
Subject: Redirecting HTTP to HTTPS
Hello everyone,

First of all, thanks for your help in advance -- I know this is probably a silly question but I just can't figure it out.

So I want to redirect all HTTP to HTTPS version of the site. I've set up my SSL certificate using Letsencrypt and it's working well, but everytime I type in the url without https it still goes to the http site.

I have tried setting up
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
in the .htaccess file in the root directory of my doku wiki folder, but it doesn't seem to work.
Is there something else that I should do...?

I'm using Ubuntu 18.04, with Apache 2.4.29.

I would appreciate any help, thank you!
Avatar
rasca0027 #2
Member since Dec 2018 · 2 posts · Location: Brooklyn, NYC
Group memberships: Members
Show profile · Link to this post
Actually I just figured it out 10 mins after my original post...
I will post a reply here so that maybe future people can see it, but let me know if I should just delete it instead.

So I forgot to change something in `apache.conf`.
The file is located inside `/etc/apache2/apache.conf`, and I had to change AllowOverride from None to All.
Like this:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>
Avatar
schplurtz (Moderator) #3
Member since Nov 2009 · 437 posts · Location: France, Finistère
Group memberships: Global Moderators, Members
Show profile · Link to this post
I will post a reply here so that maybe future people can see it, but let me know if I should just delete it instead.
Just speaking for myself : forums are made to share, so others can benefit from your experience.
Thank you for your posts, and welcome to this forum.
Avatar
Michaelsy #4
Member since Jun 2015 · 922 posts · Location: Düsseldorf, Germany
Group memberships: Members
Show profile · Link to this post
..., but let me know if I should just delete it instead.

No! It is the best thing you can do! Unfortunately, that will be done much too little.

Greetings - Michael Sy.
By Patreon.com a few eurons can be fed into the code phasers of
the DokuWiki engine. Besides, Andi's posts are worth reading.
This post was edited on 2019-01-17, 16:17 by Michaelsy.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-06-17, 03:01:54 (UTC +02:00)