html, javascript, php, jquery등으로 사이트 이동하는 방법
본문
HTML :
<!DOCTYPE html>
<html>
<head>
<!-- HTML meta refresh URL redirection -->
<meta http-equiv="refresh"
content="0; url=http://www.365ok.co.kr">
</head>
<body>
<p>이 사이트(페이지)는 이동되었습니다.:
<a href="http://www.365ok.co.kr">기존사이트</a></p>
</body>
</html>
Javascript :
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
// Javascript URL redirection
window.location.replace("http://www.365ok.co.kr");
</script>
</body>
</html>
jQuery :
<!DOCTYPE html>
<html>
<body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
// jQuery URL redirection
$(document).ready( function() {
url = "http://www.365ok.co.kr";
$( location ).attr("href", url);
});
</script>
</body>
</html>
PHP :
<?php
// PHP permanent URL redirection
header("Location: http://www.365ok.co.kr", true, 301);
exit();
?>
- 이전글홈페이지 하단에 사업자정보 링크 걸기 15.08.19
- 다음글font Awesome icons을 활용한 가로 네비게이션 메뉴 15.05.17