代码点火器链接以加载不同的视图


Codeigniter link to load different view

我不确定我在这里做错了什么。一切看起来都很好。但是我在页面加载时不断收到错误 500。

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Site extends CI_Controller {
    public function index() 
    {
        $this->home();
    }
public function home()
    {
        $this->load->view("header");
        $this->load->view("site");
        $this->load->view("footer");
    }
public function about()
    {
        $this->load->view("header");
        $this->load->view("about");
        $this->load->view("footer");
    }
}

如果我去链接 mywebsite.com/site/about

我将收到 500 内部服务器错误

我做错了什么?

我的htaccess文件看起来像这样

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index'.php|images|scripts|robots'.txt)
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]

想法?思想。我知道这是愚蠢的。我已经几个月没有做任何CI工作了。

谢谢

我发现了问题所在。这是htaccess文件的东西

我必须这样做才能让它工作

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

谢谢

1) 您的 CI 文件夹位于根文件夹中还是位于文件夹"站点"中?

2)如果在"站点"文件夹中尝试使用 mywebsite.com/site/your_controller_name/about 也可以尝试 mywebsite.com/index.php/site/about 或 mywebsite.com/site/index.php/your_controller_name/about

我怎么称呼它:mywebsite.com/CodeIgniter/Welcome/About
CI文件位于文件夹"CodeIgniter"中,这就是我的.httaccess的样子:http://pastebin.com/30TReyqe