我有笨传递变量默认的控制器在笨
class Welcome extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
一个默认的控制器,你知道,我们可以调用这个函数
sitename/index.php
或
sitename/
我在.htaccess中重写网址
现在我要打电话与参数相同的索引功能通过像
sitename/seo-services
,其中搜索引擎优化服务将paramater传递给指数函数加载SEO服务页面。
为笨的默认语法
example.com/class/function/ID
我想在这个formet
example.com/class/ID
,我想跳过功能默认(索引)功能类
我该怎么做?
感谢
,你可以看到我试图这样的搜索引擎优化的目的。
亲爱的我做了同样的事,但我得到了错误404页面未找到,实际上我试图将值传递给默认控制器,我的url就像localhost/seo-services – air
正如代码下面的段落所述。你首先需要设置.htaccess(正如文档中提到的http://ellislab.com/codeigniter/user-guide/general/urls.html)。然后,你需要修改你的application/config/routes.php中的路由(正如http://disislab.com/codeigniter/user-guide/general/routing.html中的文档所解释的) –
我想我无法来解释你,看看默认的语法是example.com/class/function/ID我想example.com/class/ID在那里我将跳过类 – air