regular expression for custom route element in cakephp

Here is my acutal link

/news-wet/top-new/asd-def-jkl.html 

and i m using:

Router::connect('/:newsroute/*', array('controller' => 'article', 'action' =>'articleDetails'),array('newsroute'=>'/news-[a-z]+/top-news/')); 

this convention to redirect in cakephp routes.php file.

in /news-wet/, wet string might be vary and last asd-def-jkl.html also vary.but it is not working.


Source: regex

Leave a Reply