私は現在、クライアント用のショッピングカートを構築していますが、国ごとに異なるバージョンが必要です。そのために、europe.website.comとrow.website.comという2つのサブドメインを作成しました各国固有のショッピングカート
On my .htaccess I also have this...
# Make all requests have www in them
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website\.com
RewriteRule ^(.*)$ https://www.website.com/$1 [R=permanent,L]
それはちょうどwwwを強制します。サイトではこれはサブドメインと違いはありませんが、「https」のようにセキュリティリスクが発生します。
このウェブサイトが提示するセキュリティ証明書は、別のウェブサイトのアドレス に対して発行されました。
セキュリティ証明書の問題は、サーバーに送信するデータを欺くか、または を傍受しようとしている可能性があります。
このウェブページを閉じて、この ウェブサイトを続行しないことをおすすめします。
あなたはそこに見ることができるように最初の問題です! 2番目の問題は、それがそれらのサブドメインにリダイレクトされないと私は理由を理解できないということです!ここで私はメインのウェブサイト上で私のindex.phpに使用しているPHPのコードブロックです....
<?php
$lc = "";
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$lc = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
}
if($lc == array("ab", "ad","ae","af","ag","al","am","ao","aq", "aa", "af", "sq", "am", "ar", "an", "ac", "as", "aw", "ax", "az", "bb", "bd", "bf", "bg", "bh", "bi", "bj", "bm", "bn", "bo", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg","ci","ck","cl","cm","cn","co","cr","cu","cv","cx","dj","dm","do","dz","ec","ee","eg","eh","er","et","fj","fk","fm","fo","fx","ga","gd","ge","gf","gh","gl","gm","gn","gp","gq","gs","gt","gu","gw","gy","hk","hm","hn","ht","id","il","in","io","iq","ir","is","jm","jo","jp","ke","kg","kh","kl","km","kn","kp","kr","kw","ky","kz","la","lb","lc","lr","ls","ly","ma","md","me","mf","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","np","nr","nt","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pw","py","qa","re","ru","rw","sa","sb","sc","sd","sg","sh","sj","sl","sn","so","sr","ss","st","su","sv","sy","sz","tc","td","tf","tg","th","tj","tk","tm","to","tp","tr","tt","tv","tw","tz","ug","um","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","ye","yt","yu","za","zm","zr","zw")){
header("location: https://row.website.com/index.php");
exit();
} else if($lc == array("an", "at", "ba", "be", "ch", "cs", "cy","cz", "de", "dk", "es", "eu", "fl", "fr", "fx", "gi", "gr", "hr", "hu", "ie", "it", "li", "lt", "lu", "lv", "mc", "mt", "nl", "no", "pt", "rs","ro", "se", "sl", "sk", "sm", "tn", "ua", "uk", "xk")){
header("location: https://europe.website.com/index.php");
exit();
}
?>
私は私が私にリダイレクト配列に「英国」を追加することを決定し、英国に拠点を置くていたようヨーロッパのサブドメインだけどそのような幸運はありませんし、州の他の友人にサイトをチェックしてリダイレクトするかどうかを尋ねましたが、それでもメインドメインにとどまるだけの喜びはありません。
誰でも手がかりを手に入れましたか?前もって感謝します!
-Phillip DEWS
[OK]を
UPDATE私は再びそれをすべて変更していると私はサイトをチェックして、海外の人に尋ねたが、そのまだリダイレクトされていないすべて!ここに私のコードは....です
<?php
$lst ['euro'] = array("be","bs",ECT ECT...);
$lst ['other'] = array("ab","aa","af");
$lc = "";
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){
$lc = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
}
else $lc = 'en';
if(in_array($lc, $lst['other'])){
header("location: https://www.WEBSITE.com/row/index.php");
exit();
}
elseif (in_array($lc, $lst['euro'])) {
header("location: https://www.WEBSITE.com/europe/index.php");
exit();
}
else {
header("location: https://www.WEBDESITE.com/index.php");
exit();
}
?>
は、SSLはそれらに取り組み、だけではなく、そこに2つの新しいディレクトリを追加しないとサブドメインを取り除くことにしました!
前もって多くの感謝をお寄せください。 -Phillip結露
あなたの証明書は唯一、それがサブドメインが含まれていないトップドメインのために発行されます。サブドメインを含む証明書を取得する必要があります。 – Michal
言語≠場所。 – Gumbo
サブドメインを削除してルートに新しいディレクトリを作成して、それが国コードに気づいた場合に –