MyBB Community Forums

Full Version: Google SEO Mod Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have enabled the seo urls within the plugin, updated the htaccess, and installed the new functions.php file, but when I click on any thread in the forum it doesn't seem to find it. mysweatyhandsandfeet.com/forum/

Wes
Does your host support mod_rewrite?
(2010-08-27, 12:58 PM)jlong1 Wrote: [ -> ]Does your host support mod_rewrite?

Yes it definitely does. I have other sites hosted on the same account that redirect using mod_rewrite.

Wes

If the URLs give you 404 errors, then your rewrite rules don't work for some reason. So you will have to fix your .htaccess. Some hosts need a RewriteBase specified, try adding RewriteBase /forum/ before your rewrite rules. Other than that, check that you have the correct rewrite rules in there...
Thanks frostschutz

This is my htaccess at the moment:
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

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

# 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 /forum/misc.php?google_seo_error=404

	RewriteRule ^([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

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

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

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

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

	RewriteRule ^([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^([0-9]+)-year-([0-9]+)\.html$ calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
	RewriteRule ^([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^([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 ^([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

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

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

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>

This is the standard code plus the code google seo mod says to add. I've not altered anything so I can't see the rewrite rules being wrong.

Where exactly would I add the RewriteBase and what exactly would I need to add? Thanks for your help!
You would add RewriteBase /forum/ on the line below RewriteEngine On.
(2010-08-27, 01:45 PM)jlong1 Wrote: [ -> ]You would add RewriteBase /forum/ on the line below RewriteEngine On.

Thanks jlong, will give it a bash! Let you know in 2 whether it sorts it or not. Big Grin

Wes
Right I think I've got this whole thing completely wrong! Huh

I've just realised the htaccess.txt is still just that, a text file. Would I need to rewrite this to .htaccess for this to work? Also, I've got this htaccess.txt file in the forum root, is that right? Or does it need to go in the site route, in which case I need to move the code over to the htaccess file in my site root?

Wes

htaccess.txt is just an example file, it is to be named ".htaccess" (dot followed by htaccess) for it to work.
Yes, it needs to be renamed to .htaccess - leave it in the mybb directory though.
Hi,

You have done the whole thing wrong it has to accessed the name correctly and you need to convert the text file into htaccess file.




_________________________________________________________


Earn an Extra $1000 to $1200 per month doing Part Time Data Entry Jobs! Work from home data entry jobs to post simple data submissions on Internet. Make $1 per entry. Easy form filling, data entry and ad posting jobs. No selling, No phone calls, No Marketing. No Investment. Bi-weekly payments. Full Training Provided. Pls visit: Data-Entry
[/i]
Pages: 1 2