MyBB Community Forums

Full Version: how to force www?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If this was wordpress, then all I need to do is
setup something like https://www.domain.com
(boom, im done, wp does the rest...)

however, setting this up in config simply does
nothing, nor does it force the site into that direction...

any idea on how to force the site to use https://www.domain.com?

Thanks
You need to make an rewrite rule for this, if you are on an apache webserver you can recive this with your .htaccess, if you are on an nginx you can do this in your host configuration, if you are on an microsoft iis server there are other special rewrite rules.

Give us some more informations or your board url and we are able to give you the correct answare.
(2017-10-19, 11:09 AM)broatcast Wrote: [ -> ]You need to make an rewrite rule for this, if you are on an apache webserver you can recive this with your .htaccess, if you are on an nginx you can do this in your host configuration, if you are on an microsoft iis server there are other special rewrite rules.

Give us some more informations or your board url and we are able to give you the correct answare.

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

This seems to do the trick.

Thanks