Urls and get parameters

I’ll admit I don’t know much about URLs yet, except that I have ‘pretty’ URLs of the form:


What I would like to do is hide the GET parameters. For example, if we are editing a user I don’t really want the user ID to show in the URL:


to just:


Do I have to redo all my URLs to POST them instead of GET? Or is there something I should have setup in URL manager?

Then you have to switch to POST method i think or by passing parameters in your controller?

The url manager won’t help you here.

You could set a session variable with your parameters though.

Simplest as possible. If you haven’t id in $_GET parameters, it is currently logged in user. He can edit his own page. If id is supplied, you can check if it is the same as one of currently logged in user and still allow him to edit his own page, otherwise only he will have only read access (if you designed your application like that). Every time when user visits e.g. www.example.com/user/edit, he will get his edit page. Or if he visits www.example.com/user/edit/5 (5 is his id) and you allow him to edit his page. If he visits www.example.com/user/edit/6 (it is not his id), you can redirect him to www.example.com/user/edit (his own page, solution which I recommend), or totally deny access to that page.

Hope this help a bit