https redirect question

Forumzster

Member
I switched my site to the https url and it works great, but people can still view the http url also. How do I make my site redirect all urls to https only?
Thanks in advance!
 
The following image shows your .htaccess file, the two colored boxes show where I have added code. The green box forces HTTPS and the red box forces www.

Use this example if your forum is installed in the web root.

1529721629127.webp

For the .htaccess to take effect, you must clear your browser cache then restart your browser.
 
Forum installed in web root.

If you want to force the removal of the 'www' then use this code:

Code:
RewriteCond %{HTTP_HOST} www.example.com$
RewriteRule ^(.*)$ https://example.com$1 [R=301,L]

For the .htaccess to take effect, you must clear your browser cache then restart your browser.
 
Forum installed in the web root

By default your forum can be accesses with HTTP or HTTPS in the URL.

Code:
https://www.domain.com
http://domain.com


To always force HTTPS you will want add this to your .htaccess file located in the web root:

1562712560032.webp

For the .htaccess to take effect, you must clear your browser cache then restart your browser.
 
Top Bottom