我有問題CodeIgniter3:404未找到網頁404頁未找到。未找到您所請求的頁面。笨3.0.6
文件:應用/控制器/的welcome.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->view('Welcome_Page');
}
public function tutorial()
{
$this->load->view('Tutorial_Page');
}
public function manual()
{
$this->load->view('Manual_Page');
}
public function forum()
{
$this->load->view('Forum_Page');
}
public function register()
{
$this->load->view('Register_Page');
}
public function login()
{
$this->load->view('Login_Page');
}
}
文件:應用/配置/自動加載/ PHP的
$autoload['helper'] = array('url');
文件:應用程序/配置/ routes.php文件
$route['default_controller'] = 'welcome';
$route['translate_uri_dashes'] = FALSE;
文件:應用程序/配置/ config.php文件
$config['base_url'] = 'http://subdomain.domain.tld';
$config['index_page'] = '';
文件:的.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
頁負荷Welcome_Page,而不是其他的網頁。
404 Page Not Found
The page you requested was not found.
在文件夾視圖,存在的網頁:Forum_Page.php,Login_Page.php,Manual_Page.php,Register_Page.php,Tutorial_Page.php和Welcome_Page.php
非常感謝您的理解!
顯示您的URL嘗試訪問。 ''base_url'應該有一個斜線' –
我試過了:$ config ['base_url'] ='http://subdomain.domain.tld/'; ...不工作。 – Aurel
嘗試改變'RewriteRule ^(。*)$ index.php?/ $ 1 [L]'。 – Tpojka