Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Gorki on December 07, 2017, 05:51:25 PM

Title: Problem with www
Post by: Gorki on December 07, 2017, 05:51:25 PM
I have my forum page.

bad-lands.com

And i have 1 problem.
When someone join in forum without www page looks normal.
like this: https://i.imgur.com/l0RRp0A.png

but when someone join in my forum with "www" page looks stupid.
like this: https://i.imgur.com/zd8K853.png

How i can fix that?
Title: Re: Problem with www
Post by: Torngate on December 07, 2017, 05:57:42 PM
Quote from: Gorki on December 07, 2017, 05:51:25 PM
I have my forum page.

bad-lands.com

And i have 1 problem.
When someone join in forum without www page looks normal.
like this: https://i.imgur.com/l0RRp0A.png

but when someone join in my forum with "www" page looks stupid.
like this: https://i.imgur.com/zd8K853.png

How i can fix that?

One thing you can do is find in your host (public_html) folder or wherever your root a file called .htaccess

#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]


but of course, replace the example.com with your site's code.

That will force WWW and your site will look normal.

At least, unless I'm sorely mistaken.
Title: Re: Problem with www
Post by: Gorki on December 07, 2017, 06:18:52 PM
Ohh finally last problem is fixed :)

Thanks man !