Free To Feel

Heading to entrepreneur.


Joshua Chi
Github

Generate a friendly URLS for your site

'We are fighting with SEO everyday ...' It is true! If you want Google 'know' more about you, it is time to give a friendly URLS to him. There are two main method that we can make a friendly URLS for our site. And we will take blog as example: 1. The simple way Append a friendly title after your original URL. e.g. Your original post url : http://xxx.com/blog/1254 After appending the post title after the original title, it will looks like http://xxx.com/blog/1254/blog_post_title_about_iron_man But there is a disadvantage of this. It would look like blog_post_title_about_iron_man is a sub-item of 1254 for search engines. You can take Felix's post as an example. I think it will be possible to modify the url like what you want, no matter which framework you are using.

  1. The final solution You can take wordpress article as an example. If you take a look at your wordpress database, there is a column named 'url' in posts table. Yes, it is the solution. What you need to do is generating a unique url for every post in your table. It is the same thing we generate an id for every record in our table. You can take the method 'getUniqueUrl' in article 'Adding friendly URLs to The Cake Blog Tutorial' for example.

I believe it will not take you half an hour to give a friendly URLS for your website. Why not give a try? :-]

comments powered by Disqus