Make SSL / https Redirect

@halilesen · 22 Apr 2024 · 736 views
Post Reply
User avatar
halilesen
#1 ·
Posts: 57
Joined: 24 Mar 2024, 18:09
Full Name: Halil ESEN
Has liked: 12
Been liked: 9
You have enabled SSL. Your site now works with the https:// prefix. This is a must for SEO. But if you pay attention, you will see that you can still enter the site with http:// and the phrase "not secure" appears. In this topic, we will redirect to SSL, so https redirect.

To make this redirection, which will allow you to take full advantage of SSL, open .htaccess file in the root where your phpBB forum is installed.

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine on
At the top you will see a code like the one above. Add the following code on the next line:

Code: Select all

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Save the changes. Now users will be redirected to https even if your phpBB forum is accessed with non-SSL http.
Post Reply
  • Similar Topics