Lambneck Posted December 26, 2012 Share Posted December 26, 2012 Hi, I am trying to make my dynamic urls more attractive/memorable by using the associated blog entry's title instead of the unique id passed in the url. Currently the address looks something like the following: www.example.com/post.php?id=5 What I want it to look like is: www.example.com/title-of-article-goes-here Does anyone know a simple way to do this? Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/272383-custom-url-change-postphpid12-to-posttitle-goes-here/ Share on other sites More sharing options...
lemmin Posted December 26, 2012 Share Posted December 26, 2012 You will have to configure your server to achieve this. Assuming you are using Apache, here is a tutorial I found on Google! http://wettone.com/code/clean-urls You can just search for "clean urls" if you want a different tutorial Quote Link to comment https://forums.phpfreaks.com/topic/272383-custom-url-change-postphpid12-to-posttitle-goes-here/#findComment-1401386 Share on other sites More sharing options...
Lambneck Posted December 27, 2012 Author Share Posted December 27, 2012 Ok thank you very much!" Clean URLs", now i got the nomenclature and now I have some functions that strip special characters but how do I acctually get the title into the url instead of the unique id and is there a clever way to still retain uniqueness of the url? Quote Link to comment https://forums.phpfreaks.com/topic/272383-custom-url-change-postphpid12-to-posttitle-goes-here/#findComment-1401421 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.