[ABD] URL Rewriting (SEO URLs)

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [DEV] SEO URLs

Post by tas2580 » Wed Jan 14, 2015 1:15 pm

Oh man so many questins, OK I will try to answer it all.

What happens if the title changes?
If the title of a topic or a forum is changed later, the URL will change too. In my phpBB 3.0 mod I had URL checking that redirected over 301 to the new URL. But now there is the canonical meta tag, so search engines will crawl the new URL in future. The canonical meta tag is like 301 but without redirecting. So its no problem to access a topic over the wrong URL because you have ever the right URL in the canonical tag. The same applies to viewtopic.php?t=123 URLs.
Maybe I will at a 301 redirect later so that you will ever get the right URL in your browser address bar.

Why URLs ends with .html?
I need something to match on it for the rewrite rules in htaccess. HTML is not wrong because your page contains HTML code and I don't think that search engines will take care of the file ending.

How is a link written like that better with search engines?
Search engines like keywords in the URL, I have explained this here in German and I don't want to translate this all into English, so believe it or not.

Why you get a 404 by clicking on the rewritten URLs?
Rewriting the output of the URLs is one thing, but you have also tell your web server how to handle the rewritten URLs. So you need rewrite rules in your htaccess file. The download contains a htaccess.txt with the rewrite rules. You need to modify your htaccess to get the new URLs to work.

User avatar
draky
Registered User
Posts: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] SEO URLs

Post by draky » Wed Jan 14, 2015 1:20 pm

Thanks for the 404 answer :)

Problem : is it ok for phpBB team to have a file to modify, rename and so ?
I though an extension should not have to have modifications in code and files to be changed...

In case of people like me uploading extension using Upload Extension, here is the content of the .htaccess :

Code: Select all

RewriteBase /

RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*)-s([0-9]*).html viewtopic.php?f=$2&t=$4&start=$5&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/(.*)-t([0-9]*).html viewtopic.php?f=$2&t=$4&%{QUERY_STRING} [L]
RewriteRule global/(.*)-t([0-9]*).html ./viewtopic.php?f=1&t=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/index-s([0-9]*).html viewforum.php?f=$2&start=$3&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*)/ viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-f([0-9]*) viewforum.php?f=$2&%{QUERY_STRING} [L]
RewriteRule ^forum.html index.php?%{QUERY_STRING} [L]
Not sure though for the "RewriteBase /" because my forum is on www.domain.com/forum/ so if I put the .htaccess in the "forum" directory, do I need to modify the RewriteBase parameter ?

User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [DEV] SEO URLs

Post by tas2580 » Wed Jan 14, 2015 1:37 pm

draky wrote:I though an extension should not have to have modifications in code and files to be changed...
Yes that's right, but the problem is, that there is no way to rewrite your URLs without modifying the htaccess file. We had the same question in the german phpbBB support forum and there "nickvergessen" from the phpBB development team answered that the only way so solve this problem is to write the viewtopic.php and viewforum.php new so that they use controllers. I can't see any other way too, and also I'm not sure that you can handle this with a symfony controller. So or so at the moment there is no way to do this without changing your htaccess file.

I know that I will maybe never get this extension into the extensions database. But that doesn't matter to me because I need this extension for my forum and I have published it if anyone else want to use it too. If the extension team will not accept it its no problem for me.

If your forum is in domain.tld/forum the rewrite base needs to be RewriteBase /forum

User avatar
draky
Registered User
Posts: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] SEO URLs

Post by draky » Wed Jan 14, 2015 2:03 pm

Yes, I understand.

It works now with the /forum/ added.

But it is breaking extensions like "Share On" because it needs images and they're called with the rewrited URL so not displayed...
Normal but... not cool.

brunoais
QA Team
Posts: 420
Joined: Wed Jun 18, 2008 10:50 am

Re: [DEV] SEO URLs

Post by brunoais » Wed Jan 14, 2015 2:03 pm

tas2580 wrote:Oh man so many questins, OK I will try to answer it all.

What happens if the title changes?
If the title of a topic or a forum is changed later, the URL will change too. In my phpBB 3.0 mod I had URL checking that redirected over 301 to the new URL. But now there is the canonical meta tag, so search engines will crawl the new URL in future. The canonical meta tag is like 301 but without redirecting. So its no problem to access a topic over the wrong URL because you have ever the right URL in the canonical tag. The same applies to viewtopic.php?t=123 URLs.
Maybe I will at a 301 redirect later so that you will ever get the right URL in your browser address bar.
What happens if the title changes back? Won't it throw the user into an endless redirect loop?
What happens if the extension is uninstalled/disabled? Don't all links just break instantly? If so, does this mean that the forum owner becomes dependent of your extension in order to safely able to update phpBB?
Don't forget that, due to the 301 redirects, even if I write the correct URL according to the current system, it will redirect to the wrong URL.
tas2580 wrote: Why URLs ends with .html?
I need something to match on it for the rewrite rules in htaccess. HTML is not wrong because your page contains HTML code and I don't think that search engines will take care of the file ending.
Just end it with .php. At least, it's not a lie anymore.
tas2580 wrote: How is a link written like that better with search engines?
Search engines like keywords in the URL, I have explained this here in German and I don't want to translate this all into English, so believe it or not.
Is this wrong?
http://www.searchmetrics.com/knowledge- ... s-us-2013/
If it is, how so?
According to it, keywords in the URL have a power of 0.01% on the weigh of the result. Even if that value is different today, I only believe it has fallen.
So I question again:
How does writing such content positively influences the search engine?
How is a link like that related to any kind of optimization? I only see extra work for phpBB on that sense.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66589
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [DEV] SEO URLs

Post by Lumpy Burgertushie » Wed Jan 14, 2015 5:36 pm

apparently the extension author is under the mistaken idea that these so called SEO friendly urls make a difference.

as you have pointed out, if they do , it is so small a difference as to not be worth the effort for someone to make major changes to their site to provide them.

however, just like the need for them is his opinion ( and lots of other misinformed people as well ),
not needing them is mine ( and most of the search engines around ).

no offense is intended to the OP here, just agreeing with the previous poster about the uselessness of any type of url rewrite for SEO purposes.


luck,
robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
draky
Registered User
Posts: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] SEO URLs

Post by draky » Wed Jan 14, 2015 6:25 pm

@Lumpy : SEO URL are cooler to see :p and better remembered in URL box of my browser...

User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [DEV] SEO URLs

Post by tas2580 » Wed Jan 14, 2015 6:54 pm

brunoais wrote:What happens if the title changes back? Won't it throw the user into an endless redirect loop?
No, the extension do not remember old URLs so you get only a redirect to the current URL if the requested URL is not correct. But now you get never a redirect because I use the canonical tag. Maybe later I will make a 301 redirect.
brunoais wrote:What happens if the extension is uninstalled/disabled? Don't all links just break instantly? If so, does this mean that the forum owner becomes dependent of your extension in order to safely able to update phpBB?
All links that are generated by phpBB will fall back to the normal URLs. Links in posts to other topics will break if you delete your rewrite rules. But you can use a script to change URLs in posts back to the normal URLs.
brunoais wrote:How does writing such content positively influences the search engine?
How is a link like that related to any kind of optimization? I only see extra work for phpBB on that sense.
I don't want to explain it any more, I have written a blog post that I have linked before, use Google translate to translate it or search other sources, the internet is full of them.

I know there are people they think SEO is not needed or SEO is bad, OK if you think so don't use this extension!
I also know there are people they want to have URL rewriting and for this people is this extension.

If you want to discuss about the sense of SEO please open a own thread for this or go to http://www.webmasterworld.com/home.htm

User avatar
Lumpy Burgertushie
Registered User
Posts: 66589
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [DEV] SEO URLs

Post by Lumpy Burgertushie » Wed Jan 14, 2015 6:57 pm

draky wrote:@Lumpy : SEO URL are cooler to see :p and better remembered in URL box of my browser...
"cooler" is such and subjective thing that it means nothing.
don't know what better remembered in the URL box of your browser means.

personally, I rarely look at the url, I just click on it and I believe that is what most people do as well.

people just click on urls they don't know or care what they are as long as it takes them where they want to go.

google does not care about any of this at all. google understands what phpbb urls are and doesn't need any human readable urls to be able to index and rank a web page.

and just to be clear, I have nothing against this extension. there will always be people that think it is helpful in some way and that is what this extension and others like it are for.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
VSE
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 4899
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: [DEV] SEO URLs

Post by VSE » Wed Jan 14, 2015 7:18 pm

hopefully this will play nice with extensions controller files, which already use human readable URLs, like myforum.com/news/page1, and not cause them to break. (Hopefully it will play nice with extensions in general)
Dictated but not read.
Official phpBB Extensions My Extensions & MODs
Please do not PM me for support.

brunoais
QA Team
Posts: 420
Joined: Wed Jun 18, 2008 10:50 am

Re: [DEV] SEO URLs

Post by brunoais » Wed Jan 14, 2015 8:28 pm

draky wrote:@Lumpy : SEO URL are cooler to see :p and better remembered in URL box of my browser...
SEO and user friendly are two completely different things.
Some characteristics of user friendly are met when doing SEO work only by a consequence of trying to make accurate URLs according to the page's content, not because being user friendly is a requirement in SEO work.
Also, "cooler" is the same as "beauty". It's not the same for everyone. Heck, might not even be for the majority.
tas2580 wrote:
brunoais wrote:What happens if the title changes back? Won't it throw the user into an endless redirect loop?
No, the extension do not remember old URLs so you get only a redirect to the current URL if the requested URL is not correct. But now you get never a redirect because I use the canonical tag. Maybe later I will make a 301 redirect.
Read the HTTP specification on the 301 status code, then read how browsers implement it (just the consequences is enough) then come back here again and answer again.
tas2580 wrote:
brunoais wrote:What happens if the extension is uninstalled/disabled? Don't all links just break instantly? If so, does this mean that the forum owner becomes dependent of your extension in order to safely able to update phpBB?
All links that are generated by phpBB will fall back to the normal URLs. Links in posts to other topics will break if you delete your rewrite rules. But you can use a script to change URLs in posts back to the normal URLs.
Do you include such script in the uninstall process?
tas2580 wrote:
brunoais wrote:How does writing such content positively influences the search engine?
How is a link like that related to any kind of optimization? I only see extra work for phpBB on that sense.
I don't want to explain it any more, I have written a blog post that I have linked before, use Google translate to translate it or search other sources, the internet is full of them.
FYI, I didn't read anything in your broken english blog post (automatic translation still sucks) about advantages and disadvantages of changing how URLs are written. You only write something that can be summed as "it is good, you should do it, it works (believe me!)".
You do some pseudo-explanations but nothing actually usable as an explanation by excessive induction or lack of proper explanation altogether.
As for other sources, wherever I look at, all say that, nowadays, SEO for the URL is plain useless. Thankfully, you also mention other things that have to be done in order to rank correctly in the search results.
In other words, you are too focused on "fixing URL for SE" -_-.
At least be sincere and tell the truth :roll: . Nothing of this is for search engines, this is for users... this... this is to improve user readability of the links, right?
tas2580 wrote: I know there are people they think SEO is not needed or SEO is bad, OK if you think so don't use this extension!
I also know there are people they want to have URL rewriting and for this people is this extension.
JSYK, I don't think SEO is bad... I also don't see it as a good thing either, though.
What I see is the URL focus for "SEO purposes" something broken from the start.
One thing is:
"User friendlier URLs"
Another thing is:
"SEO URLs"
tas2580 wrote: If you want to discuss about the sense of SEO please open a own thread for this or go to http://www.webmasterworld.com/home.htm
*sigh*...
I just wish I had a minimally intelligent discussion with you... But then... you fail at the most basic thing here... SEO optimization through urls is completely useless.

User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [DEV] SEO URLs

Post by tas2580 » Wed Jan 14, 2015 9:39 pm

VSE wrote:hopefully this will play nice with extensions controller files, which already use human readable URLs, like myforum.com/news/page1, and not cause them to break.
This is no problem as long they do not end with -f{number}/ or -t{number}.html
VSE wrote:(Hopefully it will play nice with extensions in general)
This depends on the extension, if there is a extension that will output URLs to forums/topics, they will not be rewritten. But its no problem because of the canonical meta tag.
brunoais wrote:Read the HTTP specification on the 301 status code, then read how browsers implement it (just the consequences is enough) then come back here again and answer again.
I know how 301 works. But I can't see why it should throw the user into an endless redirect loop. At now I don't do a 301 redirect, I use the canonical tag and if I will implement it in later versions it will generate the correct URL and compare it to the request URL. If both are the same no problem, if they are not the same I make one 301 to the right URL, then it will compare again, the URLs are the same and all is good. You see no way to get a endless redirect loop because after the first redirect the URL is ever correct.
brunoais wrote:Do you include such script in the uninstall process?
Not yet, maybe I will include it later but now the extension is in a early state of development and I have to do other thinks first.
brunoais wrote:I just wish I had a minimally intelligent discussion with you... But then... you fail at the most basic thing here... SEO optimization through urls is completely useless.
This thread is about the development of this extension and not about SEO optimization. If you think that URL rewriting is completely useless its OK and you don't need to use this. I don't think so and I will use it in my forum, maybe someone else also don't think that it's useless and so he can use it too.
If you want to have a discussion about SEO we can do it in another thread. If we do it here the thread will get cluttered and I will maybe miss bug reports or other questions to the extension it self.

User avatar
draky
Registered User
Posts: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] SEO URLs

Post by draky » Wed Jan 14, 2015 11:08 pm

And how do you disable it ?

I tried to delete htaccess modifications, but it gave me so much error...
And I can't login to admin : when asking my password, I enter it and it redirects to wrong url.

My admin is http://www.domain.com/forum/adm/index.php but after entering password, it goes to http://www.domain.com/adm/index.php so 404 !

So... how can I enter /forum/adm/ or how can I disable it ?

Same problem for mcp.php and others...
And even calling viewtopic.php gives 404.

So... HOW DO I DISABLE THIS ? :cry:

User avatar
tas2580
Registered User
Posts: 295
Joined: Wed May 30, 2007 1:56 am
Location: Stuttgart, Germany
Contact:

Re: [DEV] SEO URLs

Post by tas2580 » Thu Jan 15, 2015 12:56 am

@draky
I have made an update to fix the bug with the wrong link to ACP if the forum is in a folder and not direct on the domain.

1. Delete all files from /ext/tas2580/seourls/
2. Download the new files from github
3. Upload the new files
4. Go to ACP and disable the extension
5. Delete the extension from filesystem

User avatar
draky
Registered User
Posts: 247
Joined: Tue Dec 10, 2002 2:04 pm
Location: France
Name: Gilles W.
Contact:

Re: [DEV] SEO URLs

Post by draky » Thu Jan 15, 2015 6:54 am

EDIT : working :D

I manually updated ext and deleted phpbb "cache" directory by FTP...

Locked

Return to “Abandoned Extensions”