News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Moved host and url changed on reinstall clean smf

Started by Dave47, October 07, 2021, 10:40:00 AM

Previous topic - Next topic

Dave47

Hello

This is a little bit complicated, our forum been using smf 9 years it had lot problems with host storage plus forum crashed every time I tryed to updated, lots errors so made the decision to move host.

I've successfully made new database - installed SMF - imported old database with myadminphp and added back important directory files & updated the directories with repair_settings.php

total success apart from one thing_

So our forum url path was before moving host

Example.com/forums/index.php [nofollow]

And now its

Example.com/index.php [nofollow]

the problem that this has caused nothing but problems on Google, open old links are now error 404

Ive installed sitemap & robots. txt
I now have old links and new ones. (nightmare)

is it possible for me to reinstall smf over again and added this forums/ folder or is this a host problem?

Any advice would be most appreciated as I've been trying to do this for 3 days

Dave


shadav

are you wanting the forum as the main site or in a subfolder?
in your .htaccess you can write a redirect permanently moved so that google and other search engines can start to update urls
it's still going to take time to rebuild all the links but any important ones you can write redirects for

Dave47

Quote from: shadav on October 07, 2021, 11:32:09 AMare you wanting the forum as the main site or in a subfolder?
in your .htaccess you can write a redirect permanently moved so that google and other search engines can start to update urls
it's still going to take time to rebuild all the links but any important ones you can write redirects for


Hello, thanks for your response ,I did make_
.htaccess.txt file and add it in public_html
Reads.
# Redirect 404 Error pages to the home page
ErrorDocument 404 http://******.com/index.php

But looks not to work with old subfolder links, do I need to place it into one of the other.htaccess folders? Or better code?

I see 2 others,.htaccess & htaccessbackup

Thanks Dave

shadav

add your code into the .htaccess file
there is no other file extension to it
.htaccess.txt is an invalid file name and won't be read/honored
.htaccess.backup is just that a backup

add
redirect 301 /forums/ http://SITEURLGOESHERE.com
this will redirect url/forums to url but won't redirect individual links like posts and things

Dave47

Thanks shadav

That worked, I work at removing old links over time but having them redirected to the homepage is great as well.

Kind regards
Dave

Steve

Marking solved then. If you have more questions about this issue feel free to mark this unsolved and ask.
DO NOT pm me for support!

Advertisement: