regular expression for custom route element in cakephp

Here is my acutal link


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

This site uses Akismet to reduce spam. Learn how your comment data is processed.