Page 1 of 11

[ABD] URL Rewriting (SEO URLs)

Posted: Wed Jan 14, 2015 1:00 am
by tas2580
Image

Extension Name: SEO URLs
Author: tas2580

Extension Description:
Changes the URLs of forums and topics too more SEO friendly URLs with the title of the forums and topics in it. This extension is held as simple as possible, it contains no ACP, you can just install it and use the SEO friendly URLs.

/viewforum.php?f=1 becomes /forum-title-f1/
/viewtopic.php?f=1&t=2 becomes /forum-title-f1/topic-title-t2.html

Extension Version: 0.3.3

Extension Demo: https://phpbb.tas2580.net/

Extension Download: https://tas2580.net/downloads/phpbb-seo-url/

Github Repository: https://github.com/tas2580/seourls

Image

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 1:25 am
by advocatus
So, for example it would be from:

/forum/viewtopic.php?f=X&t=Y

to

/forum/General-Discussion/Look-at-topic-titles

Right?

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 1:30 am
by tas2580
/forum/viewtopic.php?f=1&t=2

will be

/forum/general-discussion-f1/look-at-topic-titles-t2.html

We need the Ids in the URL to get the correct forum/topic. Its possible that you have two forums or topics with the same title. Also the titles will be written lower and special characters will be replaced.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 1:37 am
by Dannie*
Some feature for change the profiles URLs too?

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 2:01 am
by tas2580
Not at the moment, I want to concentrate me to the forums and topics first. Maybe later, but I don't think that its a good idea to make profiles access able for search engines because they contain no content and I think it's better for the privacy of the users if there profiles are not in the search engines.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 3:56 am
by nextgen
Bookmarked for this extension. :)

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 5:02 am
by tas2580
OK, I have looked at the profile links, by default profiles are linked and if a not logged in user clicks on it he will get the login box. I have now removed the links for not logged in users so that they will see only the users names without links.

So I don't need to rewirte the profiles URLs because it makes no sense to rewrite URLs which are not visible for search engines/guests.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 6:09 am
by Sshadow
Will the forum be able to translate the old URLs? Meaning if I have links out there to the current URLs and install this they will still work?

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 9:33 am
by brunoais
Question:
How is a link written like that better with search engines?

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 9:37 am
by david63
tas2580 wrote:will be

/forum/general-discussion-f1/look-at-topic-titles-t2.html
And what happens if the forum and/or topic titles are changed?
brunoais wrote:Question:
How is a link written like that better with search engines?
My thoughts as well. Search engines do not seem to have a problem at the moment.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 9:43 am
by brunoais
david63 wrote:
tas2580 wrote:will be

/forum/general-discussion-f1/look-at-topic-titles-t2.html
And what happens if the forum and/or topic titles are changed?
My own guess is that it doesn't care. It only cares about the last one of the "-" separated tokens before the "/".
In that case:
"f1" & "t2".
The rest is ignored and can be any valid URL gibberish (ofc, it can't be the "/")

EDIT:
Personally, I don't like it ending with ".html". Feels like a trying to lie to whoever is reading the URL to believe it is a static page, which is wrong.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 10:20 am
by draky
Does it replaces .htaccess rules ?

Same questions as above :
- what about removing .html ?
- what if original title is changed ?

Nice extension :)

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 10:24 am
by Louis7777
tas2580 wrote: /viewtopic.php?f=1&t=2 becomes /forum-title-f1/topic-title-t2.html
You can also make it just /topic-title-t2.html as /viewtopic.php?t=2 works as well, without the f.

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 10:35 am
by draky
Error when clicking on a subforum (which is clickable in the main index) :

Code: Select all

Informations

No route found for "GET /poubelle-f5/"
The subforum is "f5" and name is "poubelle" ;)

When click first on parent to enter it then on the subforum : same problem : GET /xxxxx/

And click to ADMIN = 404 :evil:

EDIT : repaired : disabled it anyway as not workign, some ADMIN link are 404 (the one at the bottom of forum)

Re: [DEV] SEO URLs

Posted: Wed Jan 14, 2015 11:06 am
by HiFiKabin
^^ likewise here.

I've removed it