我在将网页放到生产环境中时遇到了一些问题。
我的config.php文件:
$config['base_url'] = 'http://www.mywebsite.com/';
$config['index_page'] = 'index.php';
routes.php
$route['default_controller'] = "welcomePage";
它是一个&一台服务器。"http://www.mywebsite.com/"正在链接到/web/。/web/是安装我的代码点火器应用程序的目录。它在localhost上运行良好。现在,当我转到"http://www.mywebsite.com/',我得到了一个404未找到的错误(代码点火器错误,所以"index.php"至少已加载。知道吗?提前感谢!:)
EDDIT 1--------------------
.htaces:从所有拒绝
将其添加到.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
</IfModule>
应该有效。。。