codeigniter +不以https index.php的 [英] codeigniter + not index.php with https

查看:107
本文介绍了codeigniter +不以https index.php的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的htaccess文件:

My htaccess file :

DirectoryIndex index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
Options -Indexes

我可以访问我的网站与HTTP请求没有的index.php但要求HTTPS不能。我要补充的index.php与要求HTTPS访问。

I can access my web with request HTTP not index.php but with request HTTPS can't. I have to add index.php to access with request HTTPS.

任何帮助是最AP preciated?

Any help is most appreciated ?

推荐答案

在尝试这个code。

RewriteEngine Onon

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond $1 !^(index\.php|indexcp\.php?|resources|robots\.txt)
RewriteRule ^([A-Za-z0-9_/.-]+)$ index.php?$1 

RewriteRule ^(CSI) index.php?/CSI
AddType text/x-component .htc

更新

RewriteEngine on

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

这篇关于codeigniter +不以https index.php的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆