MyBB Community Forums

Full Version: Google SEO 1.6.8 [EOL]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have tried the suggestions but still cannot figure out what is wrong with my .htaccess

Urls redirect to 404 page after applying changes to core files.

This is what my .htaccess looks like:


RewriteEngine on
RewriteBase /forums/
Options -MultiViews +FollowSymlinks -Indexes
DirectoryIndex index.php

#
# 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
RewriteBase /forums/

	# Google SEO workaround for search.php highlights:
	# Make this rule the first rewrite rule in your .htaccess!
	RewriteRule ^([^&]*)&(.*)$ http://freecallshub.com/forums/$1?$2 [L,QSA,R=301]
	# Google SEO 404:
	ErrorDocument 404 /forums/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]

	# 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 /forums/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>



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


# Begin hotlink protection #
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://freecallshub.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.freecallshub.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://freecallshub.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.freecallshub.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://freecallshub.combackendaccess/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.freecallshub.combackendaccess/.*$ [NC]
RewriteRule .(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|j​​peg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg​​|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|​t​tc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX​|D​OC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|​M4V​|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PP​TX|R​A|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZI​P)$ - [F]
# End hotlink protection #
How to upgrade 1.6.3 to 1.6.5? Any Instruction?
Shouldn't the debug label be only shown to admins?
Haven't install this on a newer version than 1.6.5. Any changes? Should I run it on 1.6.9?
(2012-12-23, 06:26 AM)Omar G. Wrote: [ -> ]Shouldn't the debug label be only shown to admins?

Are you talking about the error label?

It's shown to everyone as some errors are only shown to non-admins. You're supposed to leave this setting off unless you actually wish to change the HTTP response for a specific error. Then you turn it on, see the label for the error you were looking for, add it to the response rules, and turn it off again.

(2012-12-23, 11:52 AM)Jimmy. Wrote: [ -> ]Haven't install this on a newer version than 1.6.5. Any changes? Should I run it on 1.6.9?

Not sure what you're asking. Just because Google SEO is version 1.6.5, it doesn't mean it only works with MyBB 1.6.5. Those version numbers are not strictly related. Google SEO 1.6.0 was released after MyBB 1.6.4 (and does not work on MyBB 1.6.3 and prior). It should work fine in all new MyBB versions.
Thanks for confirming all these. I will install it.
Hello, how to be sure that it's installed and it work, and i don't have miss nothing? also i see that i must to add the code on .htaccess, im adding it, but don't disspaear from plugin panel information...

Add to .htaccess:
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /forums/

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

# Google SEO 404:
ErrorDocument 404 /forums/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]

My complete .htaccess code look like this:


Options +FollowSymlinks
RewriteEngine On
RewriteBase /plan-my-wedding/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^category-([A-Za-z0-9_&]+)\.html$ productpage.php?productid=$1 [L]

RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /forums/

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

# Google SEO 404:
ErrorDocument 404 /forums/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]


Please help mme
You're probably editing the wrong file, if you have two different rewritebases in one.

It should be .htaccess in the forums folder.
yes but in forum it's htaccess.txt

so what to do now?please help
(2012-12-23, 09:02 PM)pilinko Wrote: [ -> ]yes but in forum it's htaccess.txt

so what to do now?please help

You need to rename htaccess.txt to .htaccess