I am implementing a search an sending a search form to an action. Everything is working as expected but the url after the submit isn't very friendly and contain undesirable information. It is showing the whole request query array as a query string. I have a form with a fieldset element named 'album-search'.
Here is the url I am getting right now:
http://hostname/music_organizer/public/albums/page/1?album-search[term]=art&csrf=12b6065ab7ea428f02ad36a9cc363752-d96a14c1c7f1f2961112014a1e200e03&search=Search
Here is the url i am want to get:
http://hostname/music_organizer/public/albums/page/1?term=art
I have tried to set the query string in the action like this:
public function searchAction(){
//code
$this->getRequest()->getQuery()->set('term', $term);
//code
return $viewModel;
}
but no luck, Thanks in advance