-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redirection of links due to forum migration? #61
Comments
Google SEO redirects Thread-Title links back to showthread.php?tid=123 links, if you revert code changes or set scheme URL to empty. If you keep the database and MyBB code alive (move to a subdir) and rewrite Google SEO URLs to that subdir, it will continue doing those redirects for you. Then your new forum software can pick up the showthread.php?tid=123 links and redirect those to what-ever it is in the new forum system. Basically old rewriterule:
New rewriterule:
That'd be the approach that doesn't involve any additional coding. The script is already there. Redirecting back to original URLs, was part of GoogleSEO's features from the start. Only catch is that you have to keep GoogleSEO (and thus MyBB) installed somewhere. Of course, you could condense that into more concise code by taking only the relevant portions from redirect.php and url.php, and only the google_seo table, with no need to keep the full mybb install around. Then rewrite everything to a standalone google_seo_redirect.php which knows how to query the google_seo table same way Google SEO itself does. But I don't have such a script at this time, sorry. If anyone wants to contribute such a thing, I'd be happy to add it into the package. |
Thank you for answering so quickly and with such detail! But, If I change the rewrite rule like you mention, wouldn't that just redirect all old mybb links to the mybb thread instead of the new xenforo thread? Am I not missing an extra rule? |
It will redirect to yoursite/showthread.php?tid=123 (not the subdir, provided you don't set bburl to the subdir, which you shouldn't do). So even though MyBB is in a subdir, Google SEO will still believe the non-subdir is the correct location, according to your bburl setting. of course you need something to pick it up from there, I can't help you with that. your new forum needs to know at minimum how to redirect the original mybb URLs. |
Perhaps what I'm going to say is wrong, but then would adding a rule like this after the one you mentioned do the trick?
Considering xenforo links are of the form https://site.com/threads/1234/ |
You'd have to match
or something like it |
I'm currently on Mybb, but will be migrating to Xenforo (Client's decision).
Problem is, so far we've used for months links like this:
"https://site.com/Thread-This-is-the-title"
Without the ID in them. (Imagine that for this example link the id is 1234)/
Xenforo has links like these:
"https://site.com/threads/1234/"
If I migrate right now, anyone with one of the old mybb links would NOT be redirected to the new URL, because there is no rule I can make in .htaccess that adds the ID, as the original link doesn't have it.
I already changed the current config so that all mybb links have the ID in them, but that doesn't change the fact users will use the old links if they find them on google or on other forums.
My question is, is there any way to redirect correctly without the id in the link? Any script, or idea? I'd very much appreciate the help. Thanks in advance.
The text was updated successfully, but these errors were encountered: