News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Help before Reinstall

Started by Grendor, May 15, 2024, 02:45:05 PM

Previous topic - Next topic

Grendor

Hello,

I have a weird issue, that I thought I fixed but is causing issues.

I setup SMF 2.1, tiny portal, and starlight theme.

Things seems to work but I hit a snag and I called hosting company.

When people would type www.mywebname.com (fake site name) site would not load correctly.
But if people typed mywebname.com without the www the site would load and run fine.

Hosting company said mysql database needed to be modified to remove http:  and replace it with https:

So I did that and site could now be accessed using either www.mywebname.com or mywebname.com

But whatever changes has caused site to not load images or site function correctly.


So I am about to try to reinstall entire site (no members on it) and hope I can do it correctly this time.
I created a new mysql database and new root folder to install into and then change domain to that folder/site.

Can someone tell me will I have same issue or is there something I need to change when setting up/installing site again? I dont want the same issue again.


Thanks
Grendor
 

Aleksi "Lex" Kilpinen

You need to choose and stick with it. If you want to use www, then redirect everyone to www and configure all SMF urls to use www as well. They are technically 2 different domains, even if you can serve the same content from them.  Also, to change SMF settings you should use repair_settings instead of going directly to the database.
What is repair_settings.php?

EDIT: Also, if my host would give out advice like that - I'd jump ship.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Grendor

Quote from: Aleksi "Lex" Kilpinen on May 15, 2024, 02:49:10 PMYou need to choose and stick with it. If you want to use www, then redirect everyone to www and configure all SMF urls to use www as well. They are technically 2 different domains, even if you can serve the same content from them.  Also, to change SMF settings you should use repair_settings instead of going directly to the database.
What is repair_settings.php?

Hey,

Thanks for the fast reply to my issue, I really appreciate it.

I thought www.name.com was the same as name.com?
I ask as I would like people to be able to go to either www.name.com or name.com as some people are old school and others just do short form without the www.

ALso since I modified the mysql database like host said to do, will a repair work?


Thanks
Grendor

Aleksi "Lex" Kilpinen

No, they are not the same. www is a subdomain. You can redirect one to the other though, usually you can use .htaccess or even a simple setting within your hosting control panel to do that.

As I'm unsure what and where you actually changed in the database, I can't give you any promises - But repair_settings should show you all settings currently saved, and allow you to change them. The same applies here though, if one url uses https then all urls need to use https.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Grendor

Hello,

Well repair did not fix issues so I did totally new install and everything works fine.

I hope it stays that way...

Thanks again for the help
Grendor

Sir Osis of Liver

.htaccess


# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
</IfModule>

When in Emor, do as the Snamors.
                              - D. Lister

Advertisement: