MyBB Community Forums

Full Version: [SOLVED] Can't make GoogleSEO URLs work
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Sorry for this strange post, but CloudFlare is blocking me when I post in this very thread (maybe it thinks I am hacking the server?). So the problem is explained in the attached file.
Quote:And when I have this, I get URLs like:

-------------
http://www.gimp-forum.net/Forum-General-questions
-------------

for my "General questions" forum. Which would be fine if that URL didn't elicit a 404.

So, what am I missing?

Google SEO works, but your rewrite rules don't. Google SEO can only make suggestions for .htaccess changes, whether those actually work depend on your webserver configuration as a whole; in the end making the rewrites work is the responsibility of the webmaster.
If your using a LAMP server....

I had to add to .htaccess
# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://python-forum.io/$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]

my entire .htaccess file
http://codepad.org/ciiecaQo


**actually i had to enable the use of .htaccess as that wasnt even being used. from the apache config file
and then there was a setting in MYBB to enable...

Quote:CloudFlare is blocking me when I post in this very thread
Its 

/ var / www /

for some reason it doesnt like that
Actually not much difference between your ht-access (getting cautious with cloudflare here) and mine.

Did indeed find an AllowOverride None in the apache2 conf for that tree but changing to all doesn't change anything.

Form what I understand if I enter the URL:
www.gimp-forum.net/Forum-General-questions
the URL is rewritten to
www.gimp-forum.net/forumdisplay.php?google_seo_forum=General-questions
Then, what is still some magic for me at that point converts google_seo_forum=General-questions into fid=4 by looking things up in the mybb_google_seo table (where it indeed appears).

However, I should still be able to use the regular MyBB URLs but using
www.gimp-forum.net/forumdisplay.php?fid=4
and these also elicit a 404 and make my browser display
www.gimp-forum.net/Forum-General-questions

OTOH, changing one of the URL rewrite rules to something different
RewriteRule ^Forum\-([^./]+)$ foobarfoobar-$1 [L,QSA,NC]
Doesn't seem to change anything, and even the standard rewrite thread-nnn.html to showthread.php?tid=nnn doesn't work, so maybe it's just a case of .htaccess not being used (despite AllowOverride All  and AccessFileName .htaccess.

So, I am a bit stumped. What else can prevent .htaccess from being used (I did check the access rights and ownership)?
Quote:Did indeed find an AllowOverride None in the apache2 conf for that tree but changing to all doesn't change anything.
I did it in the sites-enabled config file not in the apache2.conf

http://codepad.org/MSbOrGVf
blocking posts for paths is a PITA
(2016-10-12, 09:46 PM)Ofnuts Wrote: [ -> ]Then, what is still some magic for me at that point converts google_seo_forum=General-questions into fid=4 by looking things up in the mybb_google_seo table (where it indeed appears).

Well, Google SEO runs a database query to get the fid and sets that so MyBB knows what to do.

But in your case it doesn't get that far; the rewrite itself fails

(2016-10-12, 09:46 PM)Ofnuts Wrote: [ -> ]However, I should still be able to use the regular MyBB URLs but using
www.gimp-forum.net/forumdisplay.php?fid=4
and these also elicit a 404 and make my browser display
www.gimp-forum.net/Forum-General-questions

Because Google SEO sees you're using the old URL and tries to redirect you to the new one. You can disable Google SEO Redirect in the settings.

(2016-10-12, 09:46 PM)Ofnuts Wrote: [ -> ][/b][/i]So, I am a bit stumped. What else can prevent .htaccess from being used (I did check the access rights and ownership)?

Endless possibilities ... Confused
Eventually got it to work.... just needed to enable the rewrite module in Apache. Arggg.