에 따라 리디렉션 PHPMaxminds GeoIP가 ... 국가 코드
페이지가 올바르게 리디렉션되지 않음 Firefox가 서버가 이 완료되지 않는 방식으로이 주소에 대한 요청을 리디렉션 중임을 감지했습니다. 이 문제는 accecp 쿠키를 사용하지 않거나 거부함으로써 발생할 수 있습니다.
과 말 크롬의에서
.....나는 .... 내 난 다음 PHP 코드 블록 내 index.php 파일을 편집 한 후 호스팅의 디렉토리로 GeoIP.dat 및 Maxminds 웹 사이트에서 GeoIP가 PHP API의 geoip.inc 파일을 업로드이 웹 페이지는 https://www.website.com/row/index.php에서 웹 페이지가 너무 많은 리디렉션 가져왔다에 리디렉션 순환 오류가 있습니다. 이 사이트의 쿠키를 지우거나 타사 쿠키를 허용하면 문제가 해결 될 수 있습니다. 그렇지 않은 경우 서버 구성 문제 일 수 있으며 컴퓨터에는 문제가 없습니다.
<?php
require_once("geoIP/geoip.inc");
$gi = geoip_open('geoIP/GeoIP.dat', GEOIP_MEMORY_CACHE);
$country = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
// prints the country code your visitor is in
$my_countriesrow = array('AD','AE','AF','AG','AI'.....ect);
$my_countrieseuro = array('AN','AT','BA','BE','BG','BY','CH'.....ect);
/* $my_country = array('GB','UK'); */
if (!in_array(strtolower($country), $my_countriesrow)) {
header('Location: https://www.website.com/row/index.php');
exit();
}
else if(!in_array(strtolower($country), $my_countrieseuro)){
header('Location: https://www.website.com/euro/index.php');
exit();
}
else {
header('Location: https://www.website.com/index.php');
exit();
}
// the end
geoip_close($gi);
?>
나는
# Make all requests have www in them
RewriteEngine On
RewriteCond %{HTTP_HOST} ^website\.com
RewriteRule ^(.*)$ https://www.website.com$1 [R=permanent,L]
은 이미 내 머리를 당긴 할 그 밖의 무엇을 잘 모릅니다 .... 그것이 그것에서이 포함되어 나의 htaccess로 파일과 함께 할 수있는 뭔가가 있다고 생각 이! 많은 advace들 덕분에! 나는이 방문하고있어 경우이 코드를 가정
는 감사 -Phillip
페이지이에 리디렉션되는이 같은
뭔가 루프를 방지 할 수 있는가? 리디렉션되는 페이지가 있습니까? – HarryBeasant
메인 웹 사이트의 index.php에 해리! –