Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Google SEO
#1
Yo, im using the google seo plugin, but i want to make user profile links from:

User-admin

to

admin


So when going to profiles instead of having "/User-admin"

I want "myurl.com/admin" etc, i've changed my admincp url aswell so that's not a conflict.

How would i go on about doing this, seen other forums doing it.

My .htaccess:

# 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]
 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]
Reply
#2
Well, this is a really bad idea imho.
The rule to change is RewriteRule ^User-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC] and you have to remove the User-, but you'll have to move this rule at the end of your .htaccess because it's overriding all rules: it will match every url which not contains dot or slashes.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#3
(05-14-2019, 07:00 AM)Crazycat Wrote: Well, this is a really bad idea imho.
The rule to change is RewriteRule ^User-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC] and you have to remove the User-, but you'll have to move this rule at the end of your .htaccess because it's overriding all rules: it will match every url which not contains dot or slashes.

Ok, can you copy my htaccess? and then paste it with the changes your suggesting?

I am really retarded

Also wouldnt i need to change this aswell:

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

Under # Google SEO URL Events:

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

I added these rules in end of .htaccess but now every profile i go to links to User-admin

and it havent even changed to /admin

its still /User-admin
Reply
#4
The rules are for the redirection, they won't change the links in your forum. You have to modify the settings in Google SEO plugin.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#5
Where

(05-14-2019, 08:00 AM)Crazycat Wrote: The rules are for the redirection, they won't change the links in your forum. You have to modify the settings in Google SEO plugin.

Ok i went into Google SEO URl settings

User-{url}

Removed user- from this.

(05-14-2019, 08:00 AM)Crazycat Wrote: The rules are for the redirection, they won't change the links in your forum. You have to modify the settings in Google SEO plugin.

Solved it, but Staff Online still thinks my username is /admin lmaooo, and also when i use this:

it links me to User-felgen instead of /felgen

IMG:
[Image: orDGtSk.png]

When i click it redirects to User-felgen and it actually shows my profile for the url "User-felgen" even though i moved both rules to the end of .htaccess

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

And like URL's on other orange like find threads etc and on my profile it links to User-admin still, i changed my name to felgen in admincp does that take awhile to update or what, did i eggplant something up?
Reply
#6
I don't know the Google SEO plugin, but peharps is there a cache to clear/recreate ?
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#7
Have you also changed the ACP setting for the URL scheme?

   
Reply
#8
(05-14-2019, 10:19 AM)doylecc Wrote: Have you also changed the ACP setting for the URL scheme?

Yes i have, its only {$url} now there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)