古いサイトから新しいサイト(HTTPSを含む)へのすべてのトラフィックをリダイレクトする.htaccessを検索しましたが見つかりませんでした。.htaccessはHTTPを含むOldDomainをNewDomainにリダイレクトする
実は私はこの持っている:
RewriteEngine on
# First rule - if this is an SSL connection, then redirect
# to http://example.com then stop processing other rules
RewriteCond %{HTTPS} on
RewriteRule (.*) http://www.OldDomain.com/$1 [R=301,L]
# Second rule - all other requests, redirect to http://newdomain.com.
RewriteRule (.*) https://www.NewDomain.com/$1 [R=301,L]
をそして、この1つは、これらの状況のための完璧な作品:
http://OldDomain.com/ > https://www.NewDomain.com/
http://OldDomain.com/internal/ > https://www.NewDomain.com/internal/
http://www.OldDomain.com/ > https://www.NewDomain.com/
http://www.OldDomain.com/internal/ > https://www.NewDomain.com/internal/
https://OldDomain.com/ > https://www.NewDomain.com/
https://www.OldDomain.com/ > https://www.NewDomain.com/
しかし、HTTPSでのこのような状況にはない。
https://OldDomain.com/internal/
https://www.OldDomain.com/internal/
は何I私の.htaccessには欠けていますか?
おかげ
こんにちは.... では古いのルートの.htaccessにこれを入れて: は3行目にdomain.comのappeasを表示され、4はOldDomainまたはNEWDOMAINですか? – Gabrielizalo
最初のものは古いものと2番目のものが新しいものです。 –