2017-09-28 8 views
1

私のアプリをリダイレクトしようとしていますが、何か問題があります。htaccess - すべてのトラフィックをapp.example.comにリダイレクト

app.example.com 
www.app.example.com 
http://app.example.com 
https://www.app.example.com 
to https://app.example.com 

任意の助けを:私はからのすべての着信トラフィックをリダイレクトしたい

Options +FollowSymLinks 
RewriteEngine On 
RewriteCond %{HTTP_HOST} ^app.example.com [NC] 
RewriteRule ^(.*)$ https://app.example.com/$1 [R=301,L] 

RewriteRule .* index.html [L] 

: は、私が試しましたか?

答えて

0
RewriteEngine On 
RewriteCond %{HTTP_HOST} !^app\.example\.com$ [NC] 
RewriteRule (.*) http://app.example.com$1 [R=301,L] 
RewriteCond %{HTTP:X-Forwarded-Proto} !https 
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] 

//this redirect all not existing routes to index.html 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.html [L] 
関連する問題