我使用Heroku PHP与SSL上。一切安装和HTTPS完美。 我的域名托管于Godaddy。 Heroku作为apache web服务器。 但http://mysite.com,www.mysite.com将不会重定向到https://www.mysite.com 这就是我想要的。强制所有页面HTTPS
我改变了.htaccess文件到以下
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} protected [NC,OR]
RewriteCond %{REQUEST_URI} protected2 [NC,OR]
RewriteCond %{REQUEST_URI} protected3 [NC]
你可以添加转发规则吗? – Qben
看到这个(它适用于我):https://stackoverflow.com/questions/31467871/setting-up-https-redirects-on-heroku-laravel-instance# – Onthemail