CodeIgniter Forums
I need help on the link url in posts - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: I need help on the link url in posts (/showthread.php?tid=63572)



I need help on the link url in posts - huutanphp - 11-15-2015

I have the following link

example / news / google-anc / 15.html and when I change 15 to 10, it will be processed and transferred to one other affiliate of id 10. eager subservience


RE: I need help on the link url in posts - PaulD - 11-15-2015

There is an interesting read here about id's in urls.

https://philsturgeon.uk/http/2015/09/03/auto-incrementing-to-destruction/

Since reading that I never use ID's in url's now. It is just as easy to generate a random URL friendly code when you create records and instead of using the ID in the url use the code. So your link would be something like

Code:
example/news/google-anc/wx3js98wfh.html

instead of

example/news/google-anc/15.html

Hope that helps,

Paul.