MyBB Community Forums

Full Version: Google SEO 1.8 and Modification
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://community.mybb.com/thread-202483-page-3.html

How to add numbers to the URLs (for improved page loading and avoidance of URL conflicts) also how to make all lower case and use slashes instead of dashes.

(2017-03-05, 01:52 AM)jy76 Wrote: [ -> ]I'd like to add a number for forum and thread URLs, mainly cause it improves page loading speed and keeps duplicate URLs from possibly coming about.  How do I do this?  Well, I know the .htaccess page has to be modified with some character etc..

Anyhow, I want:


http://website-name-goes-here.com/forum-on-topic-31

and

http://website-name-goes-here.com/thread-mybb-plugins-31

instead of

http://website-name-goes-here.com/Forum-On-Topic

and

http://website-name-goes-here.com/Thread-Mybb-plugins


Also, as you noticed, I want this all in lower case and it is not in the given version.    Any ideas?

How do you add slashes instead of dashes?

Example:


http://website-name-goes-here.com/forum/on-topic/31

http://website-name-goes-here.com/thread/mybb-plugins/31

Original code:

Add to .htaccess:
# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

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

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

# 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]