Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: f00ty on August 08, 2010, 03:02:59 PM

Title: Changing forum path
Post by: f00ty on August 08, 2010, 03:02:59 PM
I currently have my forum in root of the my webhosting server, like mysite.com.
Now I'd like to change SMF to be in mysite.com/forum (I planned to change SMF settings with repair_settings.php).
Then I'll redirect everything from mysite.com to mysite.com/forum.
But how I can change posts paths or will they be changed automatically? For example post (I'm using prettyurls) mysite.com/board/I-need-help to mysite.com/forum/board/I-need-help. So is there a way to redirect those posts from original to the new location? I don't have ssl connection to my webhost available, only ftp.

I'm using SMF RC3 with prettyurls modification.
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:14:48 PM
Not sure how it'll affect PrettyURLs.

What about backing-up, uninstalling that mod, moving everything and repairing settings, then reinstalling the mod?

Don't forget that your members and search engines will still go to your old URL.
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:16:45 PM
Quote from: K@ on August 08, 2010, 03:14:48 PM
Not sure how it'll affect PrettyURLs.

What about backing-up, uninstalling that mod, moving everything and repairing settings, then reinstalling the mod?

Don't forget that your members and search engines will still go to your old URL.

Yes, that's the problem, everything will go in the old URL still. So that's why I'm intrested in redirecting all posts from their old places to their new places (if we forget the fact I'm using prettyurls). Is that possible?
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:22:13 PM
The posts, themselves, don't have fixed URLs. They're controlled by the global settings, which Repair_Settings.php will fix.

It's just that everyone will be expecting to go to your forum, not yourforum/forum.

That won't be a problem, coz you can announce the change.

It's just that anyone finding your site from a search-engine won't get there.

If that's no hassle, I wouldn't worry about it.
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:27:10 PM
Ok, thanks for your quick responses, but I still don't know if you answered my question or not, I'm sorry. So I'll explain one more time:

In website X,  there's a link to: mysite.com/board/hello
Now, I change my forum to be at mysite.com/forum
So, the post is now at mysite.com/forum/board/hello
Where will the link from website X go? Will it show 404, or is it automatically redirected to mysite.com/forum/board/hello?
If not, is there way to do redirection to all my forum posts?
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:31:48 PM
I don't think so, no.

I would imagine that you'd need to set up a kind of general alias, to do that.

No idea how you'd do that, though.

I'll do some research.

No promises, though. ;)
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:34:58 PM
Ok, thank you. Luckily my forum is quite new, so there's only few URLs in net to my posts (if we don't count the basic mysite.com, which is not the problem).

I can manually create redirect HTML's to those posts which are linked from other websites. But for Google, it would be so much nicer to have every post redirected.
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:37:12 PM
Out of pure curiosity, why are you going to all this hassle, just to put your forum in a subdirectory?
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:42:04 PM
It's because I'm planning to make my site bigger, there will be another stuff too than only the forum. Another option would be to create subdomain, like frontpage.mysite.com, but I don't like the option, I think that would be difficult to remember to some. But mysite.com and mysite.com/forum sounds good. It would be ok too to have forum.mysite.com and frontpage.mysite.com, but it's too late now, and I prefer mysite.com and mysite.com/forum better. But if you have suggestions why frontpage.mysite.com would be better option, I'm intrested to hear them. :)
Title: Re: Changing forum path everything else inside subdirectories?
Post by: kat on August 08, 2010, 03:45:45 PM
To save the hassles, why not leave the forum as-is, but put (almost) everything else in subdirectories?
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:47:48 PM
Because I don't like that option. Sorry. It would be easy option, but I don't like it.
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:50:38 PM
Fair enough!

Well, apart from what I mentioned, here http://www.simplemachines.org/community/index.php?topic=394830.msg2736737#msg2736737 you're good to go.

Can the links in other sites be changed? Or, are there millions of them?
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:54:35 PM
They aren't my sites, so they cannot be changed. :( Thanks for your help!
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 03:57:11 PM
No sweat!

I'll try some research on that alias/global redirect thingy.
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 03:58:39 PM
I appreciate it!
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:00:44 PM
Well, waddya know?

http://custom.simplemachines.org/mods/index.php?action=search;basic_search=redirect;bool=and;asc;start=0
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 04:05:04 PM
It shows the Search results... Should it show some mod?
Title: Re: Changing forum path
Post by: cicka on August 08, 2010, 04:07:22 PM
Quote from: f00ty on August 08, 2010, 04:05:04 PM
It shows the Search results... Should it show some mod?

It lists all the mods that can fulfill your requirments :)
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:10:47 PM
Well, some of them can. ;)

Particularly some on the last page.
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 04:13:13 PM
Ok, I'm sorry, could you point these mods? Best what I can see for my purposes is that 404 mod, that redirects a 404 page to certain page (but not to new location of post). I have viewed them before posting this problem. :)
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:17:43 PM
Dammit!

A few of those mads have been removed, or taken off.

They still appear, for me. (That's a real pain in the bum, too!)

I'll check them out and report back.
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:23:03 PM
Actually, I just had a thought...

None of those mods would be any good, because the redirects need to work outside of the forum, to send you TO the forum, wouldn't they?

Doh!

I'll do some more research...
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 04:25:06 PM
That's correct, because the forum wouldn't be anymore in original location. :)
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:25:19 PM
BINGO! (I think).

http://www.javascriptkit.com/howto/htaccess7.shtml
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 04:27:05 PM
Whoa, that seems to be too good to be true! It seems so simple and just what I was looking for! Thank you so much for your help, I wish that works as it supposed to work! :)
Title: Re: Changing forum path
Post by: Jokerâ„¢ on August 08, 2010, 04:27:59 PM
also  google itself remove the pages from it's database (whatever you say it) which creates 404 error . [Experience holder in this case ;) ]

But K@ solution is more promising.
Title: Re: Changing forum path
Post by: kat on August 08, 2010, 04:29:19 PM
I'm glad I found it, to be honest.

I've bookmarked it, for future reference. ;)
Title: Re: Changing forum path
Post by: f00ty on August 08, 2010, 04:29:52 PM
Quote from: Jokerâ„¢ on August 08, 2010, 04:27:59 PM
also  google itself remove the pages from it's database (whatever you say it) which creates 404 error . [Experience holder in this case ;) ]

But K@ solution is more promising.

Yes, I know that, but there still would be those sites pointing to my links. :)