개발
php 로 페이지 리다이렉션 시키는 방법
findstar
2011. 10. 7. 17:23
728x90
특정 페이지에 접속했을때
조건에 따라서 다른 페이지로 리다이렉션 시키는 방법은
1. 메타 태그를 이용하거나.
<meta http-equiv='refresh' content='0; url=도메인'>
2. 자바스크립트를 활용할 수도 있으나
<script>location.href='도메인';</script>
3. PHP header를 통해서도 가능하다.
header("Location: 도메인");
모바일 페이지로 리다이렉션 시키는데 많이 사용한다.