MyBB Community Forums

Full Version: Goole seo links
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi. Now I have link to profile looking like that: http://xxx.pl/user-1.html but I want something like that: http://xxx.pl/user-Kowol.html
(id to name)
Can someone do it for me?
Thanks
I have it, and now i have "User-id", but i want "User-name"
Turn off MyBB Built in Rewrites and enable Google SEO rewrites.
Hm, my .htaccess
# EXAMPLE .htaccess FOR MYBB WITH GOOGLE SEO URL
# -------------------------------------------------------------------
# This file is identical to MyBB's htaccess.txt example file,
# with rewrite rules for a standard Google SEO install added.
#
# Before using this file please make sure to:
#
#   - replace /MyBB/ with your forum folder, e.g. / or /forum/
#   - replace yoursite/MyBB with your forum URL
#   - name the file '.htaccess' (starting with the dot, no .txt)
#
# Alternatively you can add the required rewrite rules to your
# existing .htaccess, the specific rules required will be displayed
# on the plugin status page once Google SEO URL is enabled.
# -------------------------------------------------------------------

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

	# Some hosts need a RewriteBase specification.
	RewriteBase /

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

# Google SEO URL Forums:
RewriteRule ^([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

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

	<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/x-javascript text/css text/html text/xml
</IfModule>
And now working only this (only forum display): http://XXX.pl/Feedback--5 but if i click on user (http://XXX.pl/Kowol--1) i have this error: Wrong section
You have an extra hyphen in your url. Check the Google SEO rewrite options in your ACP -> Config -> Google SEO URL's -> User URLs.
Now its only one "-" but its still same.
You removed all the URL prefixes, resulting in conflicting, in your case even identical rewrite rules.

RewriteRule ^([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]
RewriteRule ^([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]
RewriteRule ^([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]
RewriteRule ^([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]
RewriteRule ^([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]
RewriteRule ^([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

These rules all match the same thing (everything that does not contain . or /), so the first rule matches and the other rules never come to pass. So every URL is a forum.

You're free to change the URL scheme any way you want but you have to make sure there are no conflicts. If you do not understand how these rewrites work, stick to the default settings.
Huh i made it. Thanks a lot ;*