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]
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.draky wrote:I though an extension should not have to have modifications in code and files to be changed...
RewriteBase /forum
What happens if the title changes back? Won't it throw the user into an endless redirect loop?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.
Just end it with .php. At least, it's not a lie anymore.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.
Is this wrong?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.
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 title changes back? Won't it throw the user into an endless redirect loop?
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: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?
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.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.
"cooler" is such and subjective thing that it means nothing.draky wrote:@Lumpy : SEO URL are cooler to see :p and better remembered in URL box of my browser...
myforum.com/news/page1
, and not cause them to break. (Hopefully it will play nice with extensions in general)SEO and user friendly are two completely different things.draky wrote:@Lumpy : SEO URL are cooler to see :p and better remembered in URL box of my browser...
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: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 title changes back? Won't it throw the user into an endless redirect loop?
Do you include such script in the uninstall process?tas2580 wrote: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: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?
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!)".tas2580 wrote: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.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.
JSYK, I don't think SEO is bad... I also don't see it as a good thing either, though.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.
*sigh*...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
This is no problem as long they do not end with -f{number}/ or -t{number}.htmlVSE 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 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.VSE wrote:(Hopefully it will play nice with extensions in general)
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: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.
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:Do you include such script in the uninstall process?
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.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.