cakephp plugin to make URL SEO friendly
How do I make cakephp website URL SEO friendly? Is there a plugin available for开发者_开发知识库 cakephp 1.2.6
First define what you mean by "SEO friendly".
Most likely this just means you want to add the name of your "object" to the URL, i.e. add a slug. You can do that without any plugin:
echo $html->link($record['Model']['name'], array(
'controller' => 'foo',
'action' => 'bar',
$record['Model']['id'],
Inflector::slug($record['Model']['name'])
));
// -> /foo/bar/42/the-name
If you require any more customized URLs, first specify what exactly you need, then use Routing to create these custom URLs.
it's the only way to do it wothut any trouble... but if you don't like id in the url, then you should take a title, remove all symbols, replace spaces with -, and write to the datebase...
精彩评论