【发布时间】:2017-02-25 16:54:25
【问题描述】:
我有一个英文和法文的网站 我的 htaccess 规则运行良好,但我想强制使用 https。
我在这里和那里尝试了几个例子,但我认为因为我使用的是双语系统,所以它不能按预期工作。
这是我的 htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# If your default controller is something other than
# "welcome" you should probably change this
# RewriteRule ^(app(/index)?|index(\.php)?)/?$ / [L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.eot|\.ttf|\.svg|\.woff|\.woff2|\.gif|robots\.txt)$ [NC]
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
【问题讨论】:
-
显示你为 https 尝试的代码!
标签: .htaccess codeigniter https