【发布时间】:2013-03-30 13:06:12
【问题描述】:
我在 codeigniter 中有一个默认控制器
class Welcome extends CI_Controller {
public function index()
{
$this->load->view('welcome_message');
}
如你所知,我们可以调用这个函数
sitename/index.php
或
sitename/
因为我在 .htaccess 中有 url 重写
现在我想通过参数传递调用相同的索引函数
sitename/seo-services
seo-services 将参数传递给 index 函数以加载 seo-services 页面。
因为codeigniter的默认语法是
example.com/class/function/ID
我想要这种形式
example.com/class/ID
我想跳过类的默认(索引)函数的函数
我该怎么做?
谢谢
如您所见,我正在尝试这样做以达到 seo 的目的。
【问题讨论】:
标签: php codeigniter