heroku ignore.htaccess文件
我正在向heroku部署一个Yi2项目。我需要重定向https://上的所有请求。我在frontend/web文件夹中添加了一个.htaccess文件(在heroku/frontend/web环境中)。它在本地运行,但在heroku上不起作用。发生了什么?当应用程序部署时,我可以看到.htaccess是由init.php生成的,但是如果我访问重定向不起作用:(heroku ignore.htaccess文件,.htaccess,heroku,yii2,.htaccess,Heroku,Yii2,我正在向heroku部署一个Yi2项目。我需要重定向https://上的所有请求。我在frontend/web文件夹中添加了一个.htaccess文件(在heroku/frontend/web环境中)。它在本地运行,但在heroku上不起作用。发生了什么?当应用程序部署时,我可以看到.htaccess是由init.php生成的,但是如果我访问重定向不起作用:( RewriteEngine On # If we receive a forwarded http request from a pr
RewriteEngine On
# If we receive a forwarded http request from a proxy...
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
# ...or just a plain old http request directly from the client
RewriteCond %{HTTP:X-Forwarded-Proto} =""
RewriteCond %{HTTPS} !=on
# Redirect to https version
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]