speaking URLs and cooluri usecase
Speaking URL and common problems
In recent projects we had similar requirements regarding the URLs. Some of them are:
- of course have speaking and nice URLs which are SEO friendly. This includes often the requirement to keep the URLs short!
- Autogenerate most of the URLs
- keep as much URLs in case of a relaunch.
- have the possibility to override the complete generated URL by your own.
- Support for 301/302 redirect in case a URL was changed.
- Speaking URLs for dynamic pages like News-Single View
If you have a look at TYPO3 you have many possibilitys to produce speaking URLs. But no extension fullfills all the requirements. There is the build-in (oldstyle) simulate_static for example.
If we look in the TER there are mainly 3 relevant extensions: real_url, cooluri and gs_aliaspro.
Well with this extension you are free to give a path based alias to each page, this fully fits into requirement 3. Also requirement 1 is covered. But of course all the other requirements are not covered.
Recently we decided to use CoolUri for a new project. Therefore some more details to this.
The reasons why we choose CoolUri were:
- cleaner and good maintainable code
- only one cache table :-)
- flexible configuration
So what requirements are covered by cooluri? Of course 1 is covered and 2 very well.
There is a special and really nice checkbox in the pageproperties "keep out of the middle", which enables short speaking URL paths - even if the page is in level 9. With a nice configuration and the correct pageproperties it was possible to keep as much URLs as possible in case of a relaunch.
There is also a concept for redirects in this extension - based on a concept called "oldurls" - but it is not maintainable by an editor. So requirement 5 is not covered fully.
To cover 4 we wrote a own Userfunc to generate the URLs which checks the field "overridepath" in the page. So it is possible to explicitly override a autogenerated URL.
...going live with cooluri?!
Well everything seems to be perfect with CoolUri - also some load tests runs ok. But after switching the public domain to the new TYPO3 project the server was down withhin some minutes. Switching back and start analysing the problems we came to the result that cooluri was the reason. Why? Good question: the logfile just gives a error like "too much opened filehandles". CoolUri needs to parse the XML configurationfile at each request - I think this is the problem. The error itself might be together with the PHP and serverconfiguration on that server. But however my conclusion or tip:
Carefully test your cooluri TYPO3 project under high load before going live!
Well at the end the good old realurl was our friend and the project could go live after changing the speaking URL generation to realurl.