好的,所以我有一个页面'example.com',我有一一个文件夹,其中包含我在本地主机中调试的所有代码。
因此,我的localhost路由是localhost/sistem,但我想将我的文件夹上传到位于"example.com"的域服务器,但路由将是example.com/sistem
我想走一条根本不显示"系统"的路线;当我访问"example.com"时,我直接进入系统,而不在URL 中显示系统
example.com /*server*/
sistem/ /*root folder*/
login.php /*which has the index*/
other.php
other2.php
我希望URL是example.com,但显示login.php的索引函数。
我知道我用
$route['default_controller'] = "login”;
但它在我访问"example.com/sistem"
将其添加到您的路由配置中:
$route['default_controller'] = "sistem/login”
$route['sistem/'] = FALSE; // Show 404
$route['sistem/(:any)'] = FALSE; // Show 404
$route['(:any)'] = 'sistem/$1';
$route['(:any)/(:any)'] = 'sistem/$1/$2';