About .htaccess file

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
alexwood
Registered User
Posts: 1
Joined: Tue Oct 02, 2018 3:42 pm

About .htaccess file

Post by alexwood »

Hey! Help me! Please!

On my site I use phpBB as a support forum. I would like to redirect all traffic to always use https, instead of http. Generally on my site this works fine, but as phpBB comes with its own .htaccess file, I guess that it needs some tweaks.

What I did was I added the code below at the bottom of the phpBB .htaccess file, and it seems to do its job just fine, but I was wondering if any problems might occur that I haven't thought of, using that solution.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: About .htaccess file

Post by Lumpy Burgertushie »

mine looks like this:

Code: Select all

RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
if yours works with "off' as opposed to " !=on" then I guess that is fine.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Post Reply

Return to “phpBB Discussion”