Help set up routes - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Help set up routes (/showthread.php?tid=65726) |
Help set up routes - skylab-spb - 07-16-2016 Hello, I have a URL like: * http://site.ru/news/apple/videos/ * http://site.ru/news/apple/pictures/ * http://site.ru/news/apple/reviews/ And set up routes: $route['([^.]+)/?'] = 'structure/view/$1'; According to this rule, I get only the first section: news. How do I get the last instead of the first section, like: * videos * pictures * reviews Thank's RE: Help set up routes - skylab-spb - 07-16-2016 my .htaccess file: AddDefaultCharset UTF-8 Options +FollowSymLinks Options -Indexes DirectoryIndex index.php RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L,QSA] |