국가 IP 주소에 따라 도메인을 리디렉션하는 방법 > php

본문 바로가기
사이트 내 전체검색

php

국가 IP 주소에 따라 도메인을 리디렉션하는 방법

페이지 정보

작성자 서방님 댓글 0건 조회 63회 작성일 19-08-21 11:12

본문

.htaccess파일을 적절히 조정하십시오 .

GeoIPEnable On
GeoIPDBFile /path/to/GeoIP.dat

# Start Redirecting countries

# Canada
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CA$
RewriteRule ^(.*)$ http://ca.abcd.com$1 [L]

# India
RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^IN$
RewriteRule ^(.*)$ http://in.abcd.com$1 [L]

# etc etc etc...

공식 문서 는 다음과 같습니다 .



============


플러그인 사용 : https://www.geoplugin.com/webservices/php 


국가코드 목록 : https://www.geoplugin.com/iso3166


국가별 IP 대역 : https://xn--3e0bx5euxnjje69i70af08bea817g.xn--3e0b707e/jsp/infoboard/stats/ipCurrent.jsp?nationCode1=KP

댓글목록

등록된 댓글이 없습니다.

Total 612건 4 페이지
게시물 검색

회원로그인

접속자집계

오늘
67
어제
84
최대
1,347
전체
154,438
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.