이것은 기본적인 HTML 페이지 설정 할 수 있는 다른 페이지에 리디렉션하지 로드형?
사용해 보십시오.
<meta http-equiv="refresh" content="0; url=http://example.com/" />
참고: 머리에 섹선에서 놓습니다.
또한 이전 버전의 브라우저와 빠른 링크를 추가할 경우 doesn& # 39 의 경우, t 새로고치기 제대로:
'<;;;;;; a href = " p> < " > redirect< /a> /p>' (http://example.com/), <;
나타나게 될 것이다
< p>;;;;;;; http://example.com/ " < a href = " > redirect< /a> < /p>;
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=http://example.com">
<script type="text/javascript">
window.location.href = "http://example.com"
</script>
<title>Page Redirection</title>
</head>
<body>
<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow this <a href='http://example.com'>link to example</a>.
</body>
</html>
내가 생각하는 가장 좋은 방법은 완전성을 위해 사용할 수 있으므로 가능하면, 서버 리디렉션합니다 전송하십시오 [301] (https://en.wikipedia.org/wiki/HTTP_301) 상태 코드. Htaccess 사용하여 파일을 통해 쉽게 수행할 수 있다 '' 이 [아파치] (http://en.wikipedia.org/wiki/Apache_HTTP_Server) 를 사용하여 수많은 플러그인을 통해, 또는 [wordpress] (http://en.wikipedia.org/wiki/WordPress). 확신할 수 또한 플러그인 모든 주요 콘텐츠 관리 시스템. 또한 서버에 설치되어 있는 경우 301 리디렉션합니다 스파넬 은 매우 쉽게 구성.
이는 모든 HTTP 응답 헤더를 통해 .htaccess 재생율에서 이용하여 솔루션을 추가 이전 요약
1. HTTP 헤더 새로고치기
첫째, 이렇게 설정하기 새로고치기 헤더입니다 .htaccess 사용할 수 있습니다.
Header set Refresh "3"
이것은 " static"; 헤더 () '기능을 사용하는' avamer PHP
header("refresh: 3;");
참고로 이 모든 브라우저 솔루션을 지원하지 않습니다.
2. JavaScript
대체 [uirl] 와 2:
<script>
setTimeout(function(){location.href="http://example.com/alternate_url.html"} , 3000);
</script>
대체 없이 URL:
<script>
setTimeout("location.reload(true);",timeoutPeriod);
</script>
Jquery 를 통해.
<script>
window.location.reload(true);
</script>
3. Meta Refresh
Meta refresh 의 JavaScript 와 리디렉션할 원치 않는 헤더는 종속물과의 때 사용할 수 있습니다.
대체 함께 URL:
<meta http-equiv="Refresh" content="3; url=http://example.com/alternate_url.html">
대체 없이 URL:
<meta http-equiv="Refresh" content="3">
':' &Lt 사용하여 noscript>;
<noscript>
<meta http-equiv="refresh" content="3" />
</noscript>
권장하는 대로 빌리 문, 문제가 발생했을 https://partner. 새로고치기 제공할 수 있습니다.
리디렉션된 않을 경우 자동으로: & # 39, & # 39 > <, a href = ' (http://example.com/alternat_url.html)' 를 클릭하고 here< /a>;;
리소스에는 *
메타 태그를 인사이드라면 브라우저 사이에 배치한 다음, 머리를 알려 리디렉션하지:
<meta http-equiv="Refresh" content="seconds; url=URL">
복귀시킴 초 전에, 교체 uirl 리디렉션합니다 기다리는 시간 (초) 을 통해 url 을 사용하여 원하는 대로 리디렉션하지.
Javascript 와 리디렉션할 수도 있습니다. 내부에 두는 스크랩트 태그번호 어디든요 페이지에서:
window.location = "URL"
앞으로 웹 표준을 따라야 하는 경우, 일반 HTML metalun 리디렉션합니다 현대 피해야 합니다. 대신 리디렉션할 JavaScript 코드를 만들 수 없는 경우 서버측 선택해야 합니다.
브라우저에서 HTML metalun 리디렉션할 추가하기에서는 javascript 비활성화됨 지원하기 위해 선을 '노스크리프트' 요소. '이 결합된' 표준 '태그' 노스크리프트 리디렉션하십시오 네스트된 메타 검색 엔진이 아니라 랭킹 도움이 됩니다.
피하고 싶은 경우, 자바스크립트 함수를 루프 () '' 로카션드레프리스 리디렉션하십시오 사용해야 합니다.
적절한 클라이언트 측 uirl 리디렉션할 코드는 이렇게 있는 Internet&, 빨리, 빨리, 그리고 낮은 수리 및 지체 없이 Explorer&, 8):
<!-- Pleace this snippet right after opening the head tag to make it work properly -->
<!-- This code is licensed under GNU GPL v3 -->
<!-- You are allowed to freely copy, distribute and use this code, but removing author credit is strictly prohibited -->
<!-- Generated by http://insider.zone/tools/client-side-url-redirect-generator/ -->
<!-- REDIRECTING STARTS -->
<link rel="canonical" href="https://stackoverflow.com/"/>
<noscript>
<meta http-equiv="refresh" content="0; URL=https://stackoverflow.com/">
</noscript>
<!--[if lt IE 9]><script type="text/javascript">var IE_fix=true;</script><![endif]-->
<script type="text/javascript">
var url = "https://stackoverflow.com/";
if(typeof IE_fix != "undefined") // IE8 and lower fix to pass the http referer
{
document.write("redirecting..."); // Don't remove this line or appendChild() will fail because it is called before document.onload to make the redirect as fast as possible. Nobody will see this text, it is only a tech fix.
var referLink = document.createElement("a");
referLink.href = url;
document.body.appendChild(referLink);
referLink.click();
}
else { window.location.replace(url); } // All other browsers
</script>
<!-- Credit goes to http://insider.zone/ -->
<!-- REDIRECTING ENDS -->
, Metalun " redirect", 사용할 수 있습니다.
<meta http-equiv="refresh" content="0; url=http://new.example.com/address" />
<script language="javascript">
window.location = "http://new.example.com/address";
</script>
그러나 I& mod_rewrite , # 39 옵션이 있는 경우, d 대답하도다 사용하는 것이 좋습니다.
다음과 같은 코드를 배치하십시오 & 사이에 HEAD> lt;;; 및 & /HEAD> lt;;; 태그 너회의 HTML 코드:
<meta HTTP-EQUIV="REFRESH" content="0; url=http://example.com/index.html">
위의 HTML 코드가 다른 웹 페이지 리디렉션하십시오 리디렉션하십시오 너회의 방문자 수 있습니다. 0; '이' 내용 = " 초를 기다려야 리디렉션하는 있지만브라우저에 하려면 변경될 수 있습니다.
I found 문제가 함께 작업하는 동안 jQuery Mobile 애플리케이션으로 내 메타 태그를 # 39, t 얻을 수 있는 경우에 따라 헤더입니다 wouldn& 제대로 리디렉션을 (jQuery Mobile doesn& # 39, t 검토완료 헤더도 자동으로 각 페이지의 자바스크립트 또한 랩할 않으면 효과가 있어 it 복잡해지고 있다). 내가 찾은 이 사건은 JavaScript 를 넣을 수 있는 가장 쉬운 솔루션을 직접 리디렉션을 본문에 문서마다 다음과 같습니다.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="0;url=myURL" />
</head>
<body>
<p>You are not logged in!</p>
<script language="javascript">
window.location = "myURL";
</script>
</body>
</html>
이 모든 사건의 작업하십시오 가져다줄래요 것으로 보인다.
간단한 방법으로 사용할 수 있는 모든 종류의 페이지 '는 단순히 추가하기에서는' 메타 태그에 머리:
<html>
<head>
...
<meta HTTP-EQUIV="REFRESH" content="seconds; url=your.full.url/path/filename">
...
</head>
<body>
Don't put much content, just some text and an anchor.
Actually, you will be redirected in N seconds (as specified in content attribute).
That's all.
...
</body>
</html>
<html>
<head>
<title>index.html</title>
</head>
<body onload="document.getElementById('lnkhome').click();">
<a href="/Pages/Login.aspx" id="lnkhome">Go to Login Page<a>
</body>
</html>
딱 좋은 측정:
<?php
header("Location: [email protected]", TRUE, 303);
exit;
?>
S # 39 위에 echo& 없는지, 그렇지 않으면 스크립트입니다 무시됨. http://php.net/manual/en/function.header.php
Body onload 사용할 경우 그냥 태그:
<body onload="window.location = 'http://example.com/'">
자르기 engine 을 5 초 지연:
<meta http-equiv="Refresh"
content="5; [email protected]("Search", "Home", new { id = @Model.UniqueKey }))">