The situation is quite tricky... For example I have URL
http://example.com/users
which shows all users. I also have few filters like
http://example.com/users?sort_type=ASC&sort_value=surname
or
http://example.com/users?sort_type=DESC&sort_value=name.
There also is the search which looks like this
http://example.com/users/search/by_name/?search_value=bob
or http://example.com/users/search/by_surname/?search_value=miller.
For the search I also need to add filtering params, so the main problem is in first symbol: when there is the list of users it should be ?, when search &. So is there some url generation function for generating url from URL params?