MyBB Community Forums

Full Version: Are my .htaccess looking correct?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We have hundreds of bot errors looking for mysite.com/[link] instead of mysite.com/forum/[link]

I'm wondering if the possible cause of the error is the sitemap generated by Google SEO and/or the way that .htaccess is rewriting URLs. Though there are never any errors when I actually use the site. The bots must be getting these links from somewhere.

My .htaccess looks like this in the base
#<IfModule mod_suphp.c>

#suPHP_ConfigPath /home/mysite/public_html/
#</IfModule>

RewriteEngine on

#RewriteOptions inherit

RewriteCond %{HTTP_HOST} ^mysite.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.mysite.com$
RewriteRule ^/?$ "http\:\/\/www\.mysite\.com\/forum\/index\.php" [R=301,L]
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

and like this in the forum directory

RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /forum/
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!

# Google SEO URL Forums:
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://www.mysite.com/forum/$1?$2 [L,QSA,R=301]
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

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


Does this look correct?