我已经尝试在我的服务器上多次更改我的.htaccess文件(Linux,php CGI/FastCGI)
我的网络托管是一个经销商托管,我有两个面板CP和WHM
但是当我上传我的整个网站时,我只收到404错误,并按照我的配置,htaccess和控制器文件以及文件夹结构
文件夹结构
/
index.php
/application/
/application/views [Contains main view (index page)]
/application/controllers [Contains the main controller]
Run Code Online (Sandbox Code Playgroud)
作为Code Igniter(3.0)的默认值
.htaccess文件[第一次]
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
Run Code Online (Sandbox Code Playgroud)
.htaccess文件[第二次]
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|fonts|img|css|js|dashboard|support|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
Run Code Online (Sandbox Code Playgroud)
配置文件
$config['base_url'] = '/';
$config['index_page'] = 'index.php?';
$config['uri_protocol'] = 'REQUEST_URI';
Run Code Online (Sandbox Code Playgroud)
错误日志
ERROR - 2015-02-06 14:53:34 --> 404 Page Not Found: /index
ERROR - 2015-02-06 14:53:35 --> 404 Page Not Found: …Run Code Online (Sandbox Code Playgroud)