Any good strategies, code snippets etc for preventing URL manipulation?
For example I have this url, http://localhost/profile/edit/5 the id could easily be
http://localhost/profile/edit/5
The url used to access your site is data from the client, and when security is concerned, you should always consider client provided data hostile.
Unfortunately there are no silver bullets to deal with this problem. You'll need to implement access restrictions throughout the application.