어떻게 만들 수 있습니까? http://domain.com 301 리디렉션을 http://www.domain.com으로 만드시겠습니까? 나는 ModRewrite에 .htaccess를 사용하는 데 익숙하다. 그러나 나는 Heroku에서 할 수 없다는 것을 배웠다. htaccess로의Heroku 301 리디렉션
예 :
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
내 파일 구조 : 난 그냥 한 페이지를 제공하고 있습니다
- /public
--- /style
--- index.html
- config.ru
, 내 config.ru이 구성
use Rack::Static,
:urls => ["/style"],
:root => "public"
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
},
File.open('public/index.html', File::RDONLY)
]
}
아무도 여기에 나를 위해 일하지 www.yourdomainname.com로 리디렉션 내가 오래 전에이 포기 말한다 . – David
나는 똑같은 문제가있다. 여전히 해결책이 없다? – dinkelk