我为我的网站编写了codeigniter URL路由,路由是
$route['index.php/([a-zA-Z0-9---_%])+'] = 'site/index/$1';
当我尝试访问如下链接时
http://localhost/site/index.php/india
不工作,它重定向到404页面。
如果你有链接
http://localhost/site/index.php/india
你需要写这条路线:
$route['site/index.php/(:any)'] = 'site/index/$1';