Comments (5)
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:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
New rewriterule:
RewriteRule ^Thread\-([^./]+)$ old_mybb/showthread.php?google_seo_thread=$1 [L,QSA,NC]
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.
from mybb-google-seo.
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.
Thank you for answering so quickly and with such detail!
I don't mind keeping Mybb around in a secondary directory, no problem.
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?
from mybb-google-seo.
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.
from mybb-google-seo.
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?
Something like:
RewriteRule ^showthread.php?tid=([0-9+])$ threads/$1 [L,QSA,NC]
Considering xenforo links are of the form https://site.com/threads/1234/
from mybb-google-seo.
You'd have to match %{QUERY_STRING}
instead.
RewriteCond %{QUERY_STRING} tid=([0-9]+)
RewriteRule showthread.php threads/%1
or something like it
from mybb-google-seo.
Related Issues (20)
- Move post option not working with Google SEO URLs enabled HOT 7
- Not compatible with PHP 7 HOT 1
- [Request] Meta Tag Variable or Open Graph implantation HOT 4
- Not compatible with PHP 7.*? HOT 11
- Changing meta description for threads? HOT 4
- URL Scheme keeps switching
- Poor PostgreSQL Compatibility HOT 4
- How to make it add rel canonical tag to index.php?
- 404 widget removal or replacement
- Redirection problem HOT 1
- 404 Chinese Website HOT 1
- google bot noindex problem HOT 9
- multipage() workaround improvements
- Error 404 is not working on Windows Server 2019 HOT 3
- No sitemap
- Sitemap could not be read
- Allow for default meta description for the frontpage?
- Warnings in ACP->Config->Plugins (Warning [2] Illegal string offset) HOT 1
- Custom 404 page feature?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybb-google-seo.