MyBB Community Forums
how to force www? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: how to force www? (/thread-213657.html)



how to force www? - dsimms - 2017-10-19

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


RE: how to force www? - broatcast - 2017-10-19

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.


RE: how to force www? - dsimms - 2017-10-19

(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