السلام عليكم
من فضلكم اريد كود جيكوري بقوم بما يلي
if myurl = https ; and browser url = http >> rederct browser to https if myurl = http ; and browser url = https >> rederct browser to http
var myurl ="https :// io..hsoub..com";
if( (myurl.substring(0,5)=="https") && (location.protocol == "http :") ){
//redirect to https as @ Khaled Html 's example
}else if( (myurl.substring(0,4)=="http") && (location.protocol == "https :") ){
//redirect to http
}
احسنت العمل، شكرا لك
مجتمع خاص بمناقشة وطرح المواضيع والقضايا العامة المتعلقة بتطوير الويب ولغاتها المختلفة
التعليقات