I create urls using the following pattern:
www.website.com/page/1/sort/login
When I wanna change, for example, sorting method, I simply add the new one to the end of the url:
www.website.com/page/1/sort/login/sort/email
And replace the old one in the controller (string replaces etc...). So, clicking the link with URL from above would:
- Redirect to
www.website.com/page/1/sort/login/sort/email
- Replace sorting by login with sorting by email IN CONTROLLER
The problem is that the link doesn't change of course - it contains double sort elements.
What I want to achieve is to change the route in the URL from controller's method after the redirect. Is this possible?