我在我的codeigniter文件上有这个配置:
$config['base_url'] = 'http://kandanghosting.com/mtma/';
我在我的服务器中设置我的文件夹
但仍然得到这个错误
404找不到页面
未找到您所请求的页面 .
我的htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
我的路线:
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
我完成的配置:
$config['base_url'] = 'http://kandanghosting.com/mtma/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
$config['url_suffix'] = '';
2 回答
改变你的路线
将此代码部分添加到控制器