basic module/clean URL question
Posted: Mon Dec 21, 2009 5:15 pm
Howdy all,
I'm trying to get a really simple clean URL going inside my module. Inside the SetParameters method of my module class I've got the following:
$this->RegisterRoute('/rental-search$/', array('action'=>'advsearch', 'returnid'=>$adv_search_id);
Basically, I want /rental-search to invoke the advsearch action and it doesn't need any pattern-matching. I will then add a parameter to the array and this will allow me to toggle certain search form controls on the rendered page. However, I get a 404 with this link.
If I change the regex to '/rental-search\/(?P[a-z0-9]+)$/' the link works great. So what do I need to do to get this working, this should be really easy but I can't seem to get it to work.
Cheers,
Tripp
I'm trying to get a really simple clean URL going inside my module. Inside the SetParameters method of my module class I've got the following:
$this->RegisterRoute('/rental-search$/', array('action'=>'advsearch', 'returnid'=>$adv_search_id);
Basically, I want /rental-search to invoke the advsearch action and it doesn't need any pattern-matching. I will then add a parameter to the array and this will allow me to toggle certain search form controls on the rendered page. However, I get a 404 with this link.
If I change the regex to '/rental-search\/(?P[a-z0-9]+)$/' the link works great. So what do I need to do to get this working, this should be really easy but I can't seem to get it to work.
Cheers,
Tripp