MyBB Central
Google SEO Plugin - ...thread-{id}? - Printable Version

+- MyBB Central (http://www.mybbcentral.com)
+-- Forum: Mybb Central General Discussions (http://www.mybbcentral.com/forum-1.html)
+--- Forum: Mybb General Support Help (http://www.mybbcentral.com/forum-6.html)
+--- Thread: Google SEO Plugin - ...thread-{id}? (/thread-6510.html)

Pages: 1 2


Google SEO Plugin - ...thread-{id}? - Oliver Evans - Feb 15, 2011

Just wondering how you get the Google SEO plugin to display the thread or forum id instead of the url.

Im fed up of it saying thread-i-love-jimmy.php for example
Id much prefer it if it said thread-1245.php

Let me know thanks Smile

-

SOLVED


RE: Google SEO Plugin - ...thread-{id}? - armin3000 - Jul 02, 2011

Hi
How you solved this problem? I want to show: "Thread-123-thread subject name" that 123 is thread ID. What should I write in Thread URL scheme in Google SEO settings? Thread-{id} and Thread-{tid} and Thread-{$tid} don't work.


RE: Google SEO Plugin - ...thread-{id}? - Oliver Evans - Jul 02, 2011

so basically for example you want:
site.com/thread-651-Hello
?

I will have a look into it.


RE: Google SEO Plugin - ...thread-{id}? - armin3000 - Jul 02, 2011

Exactly. I had a lot of "not found" errors in Google Webmaster page. and I found that it's because google bot wants to crawl my threads that have ID.
for example the right URL is:
http://domain.com/thread-seo-optimization-tips
but google bot has crawled this one:
http://domain.com/thread-seo-optimization-tips-60
that 60 is thread ID and it caused a not found error.
I have more than 1500 not found errors Sad



RE: Google SEO Plugin - ...thread-{id}? - Oliver Evans - Jul 02, 2011

Unfortunatly i dont think what you want is possible.
You can either force the unique identifier or not. So you can either have thread-18 or thread-hello.

There might be a way round it, but you might have speak with the author at MyBB


RE: Google SEO Plugin - ...thread-{id}? - armin3000 - Jul 02, 2011

I just want o fix Google not found errors in webmaster tools. Why it include thread id in its crawl?!!


RE: Google SEO Plugin - ...thread-{id}? - Oliver Evans - Jul 02, 2011

Id need to have a look at all of your settings.


RE: Google SEO Plugin - ...thread-{id}? - armin3000 - Jul 04, 2011

Which settings eactly you wanna know?
My threads are in this forms and they work without any problem:
http://domain.com/thread-seo-optimization-tips

But in google webmaster tools I got 200 notfounds errors and all of them are like this form:
http://domain.com/thread-seo-optimization-tips-60

I don't know how to stop this wrong crawling and tell it that my threads are in previous form.
Is this related to sitemap configuration?! how can I solve this?

In google webmaster tools> sitemap section:



/sitemap-forums.xml?page=1 OK Sitemap Jul 4, 2011 61 2
/sitemap-index.xml?page=1 OK Sitemap Jul 1, 2011 2 2
/sitemap-threads.xml?page=1 Warnings Sitemap Jul 4, 2011 196 0
/sitemap-users.xml?page=1 OK Sitemap Jul 4, 2011 242 0


I didn't understand this section in Wbmaster>Diagnostics>Crawl Error:
Show URLs: In Sitemaps ‎(65)‎
Not found ‎(2,266)‎
Restricted by robots.txt ‎(2,438)‎
Unreachable ‎(2)‎

Site maps works fine. But how this Not founds appear?!!


RE: Google SEO Plugin - ...thread-{id}? - Oliver Evans - Jul 04, 2011

It will be something wrong with your htaccess file then.
Check your plugin page and look under the Google SEO title and see if there any intructions.


RE: Google SEO Plugin - ...thread-{id}? - armin3000 - Jul 04, 2011

Thanks for your reply. I found some thing right now:
Many of errors in past 2 days are in this form:
http://domain.com/thread-seo-optimization-tips?action=lastpost
http://domain.com/thread-seo-optimization-tips?action=newpost
When I click on them they redirect to for example:
http://domain.com/thread-seo-optimization-tips?pid=241#pid241
and it show correctly.

Maybe it's the origin of problem!? how can I solve it? What is "?action=lastpost" and "?action=newpost" at the end of crawled Threads?
I found a .htaccess file for mybb with SEO. Whould you please take a look at this:

Code:
# EXAMPLE .htaccess FOR MYBB WITH GOOGLE SEO URL
# -------------------------------------------------------------------
# This file is identical to MyBB's htaccess.txt example file,
# with rewrite rules for a standard Google SEO install added.
#
# Before using this file please make sure to:
#
#   - replace /MyBB/ with your forum folder, e.g. / or /forum/
#   - replace yoursite/MyBB with your forum URL
#   - name the file '.htaccess' (starting with the dot, no .txt)
#
# Alternatively you can add the required rewrite rules to your
# existing .htaccess, the specific rules required will be displayed
# on the plugin status page once Google SEO URL is enabled.
# -------------------------------------------------------------------

Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
        # Turn off mod_security filtering.
        SecFilterEngine Off

        # The below probably isn't needed, but better safe than sorry.
        SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
        RewriteEngine on

        # Some hosts need a RewriteBase specification.
        RewriteBase /

        # Google SEO workaround for search.php highlights:
        # Make this rule the first rewrite rule in your .htaccess!
        RewriteRule ^([^&]*)&(.*)$ http://www.ethical-hackers.org/$1?$2 [L,QSA,R=301]

        # Google SEO Sitemap:
        RewriteRule ^sitemap-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

        # Google SEO URL Forums:
        RewriteRule ^Forum-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

        # Google SEO URL Threads:
        RewriteRule ^Thread-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

        # Google SEO URL Announcements:
        RewriteRule ^Announcement-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

        # Google SEO URL Users:
        RewriteRule ^User-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

        # Google SEO URL Calendars:
        RewriteRule ^Calendar-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

        # Google SEO URL Events:
        RewriteRule ^Event-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

        # Google SEO 404:
        ErrorDocument 404 /MyBB/misc.php?google_seo_error=404

        # Default MyBB Rewrite Rules:
        RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
        RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

        RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
        RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
        RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
        RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
        RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
        RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
        RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

        RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

        RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

        RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

        RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
        RewriteRule ^calendar-([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
        RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
        RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
        RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

        RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

        <IfModule mod_env.c>
                SetEnv SEO_SUPPORT 1
        </IfModule>
</IfModule>


Robots.txt:

Code:
User-Agent: *
Disallow: /captcha.php
Disallow: /editpost.php
Disallow: /misc.php
Disallow: /modcp.php
Disallow: /moderation.php
Disallow: /newreply.php
Disallow: /newthread.php
Disallow: /online.php
Disallow: /printthread.php
Disallow: /private.php
Disallow: /ratethread.php
Disallow: /report.php
Disallow: /reputation.php
Disallow: /search.php
Disallow: /sendthread.php
Disallow: /task.php
Disallow: /usercp.php
Disallow: /usercp2.php
Disallow: /calendar.php
Disallow: /*action=emailuser*
Disallow: /*action=nextnewest*
Disallow: /*action=nextoldest*
Disallow: /*year=*
Disallow: /*action=weekview*
Disallow: /*action=nextnewest*
Disallow: /*action=nextoldest*
Disallow: /*sort=*
Disallow: /*order=*
Disallow: /*mode=*
Disallow: /*datecut=*
Allow: /


I found another Robots.txt too:
Code:
Code:
Sitemap: http://forums.svus.ir/sitemap.xml

User-Agent: *
Allow: /
Disallow: /images/
Disallow: /admin/
Disallow: /cache/
Disallow: /images/
Disallow: /inc/
Disallow: /cometchat/
Disallow: /games/
Disallow: /install/
Disallow: /jscripts/
Disallow: /uploads/
Disallow: /archive/
Disallow: /arcade.php
Disallow: /attachment.php
Disallow: /calendar.php
Disallow: /captcha.php
Disallow: /ccpic.php
Disallow: /contact.php
Disallow: /css.php
Disallow: /editpost.php
Disallow: /error_404.php
Disallow: /games.php
Disallow: /global.php
Disallow: /links.php
Disallow: /links_logo.php
Disallow: /managegroup.php
Disallow: /member.php
Disallow: /memberlist.php
Disallow: /misc.php
Disallow: /modcp.php
Disallow: /moderation.php
Disallow: /myachievements.php
Disallow: /myawards.php
Disallow: /myref.php
Disallow: /newpoints.php
Disallow: /newthread.php
Disallow: /newreply.php
Disallow: /online.php
Disallow: /plaza.php
Disallow: /pm.php
Disallow: /polls.php
Disallow: /pp.php
Disallow: /private.php
Disallow: /printthread.php
Disallow: /refer.php
Disallow: /ratethread.php
Disallow: /report.php
Disallow: /reputation.php
Disallow: /search.php
Disallow: /sendthread.php
Disallow: /shoutbox.php
Disallow: /showteam.php
Disallow: /statsig.php
Disallow: /tournaments.php
Disallow: /userbar.php
Disallow: /usercp.php
Disallow: /userbarsettings.php
Disallow: /usercp2.php
Disallow: /task.php
Disallow: /warnings.php
Disallow: /xmlhttp.php

User-agent: Googlebot
# disallow files ending with these extensions
Disallow: /*.inc$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$

# disallow all files with? in url
Disallow: *mark=*
Disallow: *view=*
Disallow: *action=*

# allow google image bot to search all images
User-agent: Googlebot-Image
Disallow:
Allow: /*

# allow adsense bot on entire site
User-agent: Mediapartners-Google*
Disallow:
Allow: /*

I add this line: "Disallow: *action=*"

Do you think this robots.txt is right? I have to work 2 days to see the result in webmaster tools.