Answer the question
In order to leave comments, you need to log in
Routing failure?
Hello colleagues!
The problem is in CodeIgniter 3, or rather in routing.
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['admin'] = 'admin/login'; /* не работает */
$route['blog/(:num)'] = 'blog/veiw/$1'; /* не работает */
$route['blog'] = 'blog/index';
$route['create'] = 'main/create';
$route['(:num)'] = 'main/view/$1';
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'main/index';
Answer the question
In order to leave comments, you need to log in
$route['(:num)'] = 'main/view/$1';
$route['(:any)'] = 'pages/view/$1';
should be at the beginning
.htaccess
file
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|(.*)\.swf|forums|images|css|downloads|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question