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 » Tue Oct 02, 2018 4:06 pm

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: 65322
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: About .htaccess file

Post by Lumpy Burgertushie » Tue Oct 02, 2018 8:33 pm

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
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Post Reply

Return to “phpBB Discussion”

Who is online

Users browsing this forum: Baidu [Spider] and 25 guests