如果我在我的網頁的類別/索引/ $ 1網站上,並且想要回電到domain.com/home,則不適用於我。Codeigniter 3 - 如何回撥到家
這就是我的路線
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['admin'] = 'admin/login';
$route['category/(:any)'] = 'category/index/$1';
$route['category/(:any)/(:num)'] = 'category/index/$1/$2';
$route['page/(:any)'] = 'page/index/$1';
如果我叫domain.com/about並點擊我的導航「家」,它的工作。但是,如果我讓他domain.com/aboutdetails/index/1就在家點擊這一個:
domain.com/aboutdetails/index/home
htaccess的
#RewriteEngine on
#RewriteCond $1 !^(index\.php|images|robots\.txt|style|cdn|check\.php)
RewriteEngine on
#RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
我們展示了'$航線的代碼 –
重新排序的地方[ '類別/(:任何)/(:NUM)'] = '類別/索引/ $ 1/$ 2';'和'$路線[」 category /(:any)'] ='category/index/$ 1';'。 – Tpojka
你可以讓我們瞭解你的控制器和視圖嗎? –