如何配置CodeIgniter以打开另一个文件夹但只有域名的控制器

时间:2016-05-13 15:29:34

标签: php codeigniter routes

好的,我有一个页面' example.com '我有一个文件夹,其中包含我在本地主机中调试的所有代码。

所以我的localhost路由是localhost / sistem,但我想将我的文件夹上传到我的域服务器' example.com '但路线将是example.com/sistem

我想制作一条不显示' sistem '的路线。一点都没当我访问' example.com '我直接进入sistem而没有sistem apearring在URL

var selectFilterValues = {
  material: '',
  otherSelectListName: ''
};

$('.select-filter').change(function() {
  var selection = this.value,
    name = $(this).attr('name');

  selectFilterValues[name] = selection;

  featureList.filter(function(item) {
    var values = item.values(),
      matches = 0,
      length = 0;

    $.each(selectFilterValues, function(key, val) {
      length++;

      if (values[key].trim() == val || val === '') {
        matches++;
      }
    });

    return (matches === length);
  });
});

我想要的是作为example.com的URL,但要显示login.php的索引功能。

我知道我用

example.com /*server*/
    sistem/ /*root folder*/
        login.php /*which has the index*/
        other.php
        other2.php

但在我访问' example.com/sistem '

之后会打开

1 个答案:

答案 0 :(得分:0)

在路线配置中添加:

$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';
相关问题