Php 编码点火器3,在'上工作;http';但不是在';https';
我的htaccess RewriteEngine on RewriteBase / RewriteCond $1 !^(index\.php|uploads|images|ws|vendor|css|js|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] 重新启动发动机 重写基/ 1美元^(index\.php | uploads | images | ws | vendor | css | js | robots\.txt) 重写规则^(.*)$/index.php/$1[L] 我还隐藏了index.php 未能加载:- 作品:-Php 编码点火器3,在'上工作;http';但不是在';https';,php,codeigniter,.htaccess,Php,Codeigniter,.htaccess,我的htaccess RewriteEngine on RewriteBase / RewriteCond $1 !^(index\.php|uploads|images|ws|vendor|css|js|robots\.txt) RewriteRule ^(.*)$ /index.php/$1 [L] 重新启动发动机 重写基/ 1美元^(index\.php | uploads | images | ws | vendor | css | js | robots\.txt) 重写规则^(.*)
您需要在两个文件中进行更改
config.php
文件$config['secure\u base\u url']=”https://www.abc.in/“
url\u helper.php
文件(system/helpers/url\u helper.php)
,并在中修改代码Config.php
文件(system/Core/Config.php)
中添加以下代码,如中所示RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
这对我有用
步骤1
SSL配置(使用https运行)
允许超越所有
步骤2
.htaccess文件应该是这样的
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>
重新编写引擎打开
重写cond%{HTTPS}=在…上
重写规则^https://%{HTTP_HOST}%{REQUEST_URI}[L,R=301]
重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^index.php[L]
参考链接:
谢谢你们这些试图说服我的人
快乐编码 您是否在config.php文件
$config['base\u url']
中更改了base\u url。请在@BalasahebBhise页面上检查此项,此项操作无效too@GufranHasan$config['base\u url']=”https://www.abc.in/“
@shasha1589,是的,您也可以尝试此解决方案(system/libraries/Config.php)
我没有这个文件?您使用的是哪个版本的CI?如果您使用的是最新版本的v3.1.9,那么它将位于system/Core/Config.php
中。我使用的是3.1.9。我刚下载了一个新版本的CI来检查我的文件是否丢失了。新下载中没有。我做了必要的更改,但仍然没有帮助
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
</IfModule>