It would certainly be possible.. you would have to overwrite the show method to use the title as identifier instead of the ID. Also, the method that returns the link to a post has to be overwritten.
There are some problems with this approach though:
- You would have to ensure that the Title is unique. So basically there can only be one post titled "I need help"...
- Searching the Database on non indexed varchar fields will take much more time than searching for the ID. This will become a problem when you have several thousand forum posts.
A better solution would probably be a mixture of the two. Something like:
So that you have the ID for the application and a human readable part of the URL
Thx for your reply, well i think a second option http://www.silverstripe.org/hosting-requirements/show/270808/The-PHP-Hash-Module-Requirement is ok, but can you give me a specific mod rewrite that i should create on the htaccess file so it can be done like that?
ok so i have it working now, so here is how the url look like :
So the second parameter is the action parameter and the third one is the id, and what i did is just create a fourth parameter from the title which actually doesn't have any impact, the important thing is the action and id parameter.
I'm just wondering is this the right way for me to create a nice url so it can be crawled better by the search engine bot?