I have a form which submits data over as GET
Which means, when I do:
echo $this->Form->create('Search', array('type'=>'get', 'url'=> array('controller'=>'searches','action'=>'results')));
echo '<div class="search-box">';
echo $this->Form->input('search', array(
'class' => 'search-input',
'placeholder' => 'Search Domain Names',
'label'=>false));
echo $this->Form->input('', array(
'class' => 'search-icon',
'label' => false,
'type' => 'submit'
));
echo $this->Form->end();
?>
I get the URL as : example.com/Searches/results?search=asdadasdasd
I want to frame routes such that I get the following URL:
example.com/search/asdadasdasd.html
I had a look at : http://book.cakephp.org/2.0/en/development/routing.html
I got how to get an extension : http://book.cakephp.org/2.0/en/development/routing.html#file-extensions
But, how will I get search query inside?
Thanks