MyBB Community Forums

Full Version: Google SEO - Edited Version
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just thought I would post this here in case it would help anyone else. I had a discussion with faviouz in another thread that made me decide to do it this way instead of the way I was trying to originally.

For the Google SEO plugin I changed the following in the admin area

Quote:Forum URL scheme = {url}-Forum
Thread URL scheme = {url}.html

All other settings in the admin area I left the same.

Then just update your .htaccess:

RewriteRule ^([^./]+)-Forum$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
RewriteRule ^([^./]+).html$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

That makes it so that all topics on your forum will be like "yourdomain.com/the-topic-name.html"

And forums will be like "yourdomain.com/New-Member-Intros-Forum"

Since topics don't have any prefix you need to make sure that you have them end in ".html" so that it doesn't conflict with anything else on the forum.
Can you explain it a little.
And we just have to add the code in .htaccess or replace on something?
Replace

RewriteRule ^Forum-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
RewriteRule ^Thread-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

with my code.
If you are still using User-{url}, Calendar-{url} etc. for the others, then you have a conflict with your {url}-Forum scheme, because it's not clear what User-Forum would be - a user named Forum or a forum named User.

The .html works (but conflicts with .html files obviously) because the {url} pattern doesn't match .
True, but for the first issue there won't be any problem as long as you don't have any forum that is just named User or just named Calendar for example.

Also, it would conflict with .html files technically but I don't use any on my forum so it isn't a problem.
(2011-06-15, 04:01 PM)EnvisionChase Wrote: [ -> ]True, but for the first issue there won't be any problem as long as you don't have any forum that is just named User or just named Calendar for example.

You're underestimating the issue.
(2011-06-15, 04:19 PM)frostschutz Wrote: [ -> ]
(2011-06-15, 04:01 PM)EnvisionChase Wrote: [ -> ]True, but for the first issue there won't be any problem as long as you don't have any forum that is just named User or just named Calendar for example.

You're underestimating the issue.

Would you mind explaining further?
He's saying that any user could register with the username "forum" and mess your stuff up.
I'm saying that as long as your URL schemes have conflicts, Google SEO can not guarantee that the produced URLs will actually work, and broken URLs are the worst thing you can do for SEO. Changing the URL scheme later also hurts because redirects won't work for conflicting schemes, since you have to get rid of the rewrite rule in order to resolve the conflict. Conflicting URL schemes are one big mess you should avoid.
Is there anyway for the sitemap to contain the actual SEO URL for your forum then? It seems silly that this plugin allows you to dynamically generate sitemaps for the old not so SEO friendly URL but at the same time makes your direct pages SEO friendly...
(2011-06-17, 03:52 AM)fat2fit Wrote: [ -> ]Is there anyway for the sitemap to contain the actual SEO URL for your forum then? It seems silly that this plugin allows you to dynamically generate sitemaps for the old not so SEO friendly URL but at the same time makes your direct pages SEO friendly...

My bad, an update wrote over my functions.php which is why it was generating the old URLs... I fixed that and the sitemaps are indeed generating the SEO friendly URLs now. I don't really understand what the OP is proposing in this thread exactly??