출처:http://search-marketing.tistory.com/entry/%EA%B2%80%EC%83%89%EC%97%94%EC%A7%84%EC%B5%9C%EC%A0%81%ED%99%94-SEO-%EB%8B%A4%EC%96%91%ED%95%9C-301-Redirect-%EB%B0%A9%EC%8B%9D%EB%93%A4
검색엔진최적화 SEO를 접하시다보면 301 Redirect라는 용어를 접하시게 됩니다.
중요하면서도 혼돈하기 쉬운 방식이지요.
검색엔진최적화 SEO에서 301 Redirect가 갖는 의미는 여러가지가 있습니다.
그중에서도 가장 중요한것은 기존 페이지의 검색엔진 신뢰도를 그대로 승계한다는 개념 입니다.
그럼 어떤식으로 이 작업을 진행해야 할까요?
301 Redirect에는 여러가지 방식들이 있습니다.
몇가지 방식을 예제로 보여드리도록 하겠습니다.
ColdFusion Redirect
<.cfheader statuscode="301" statustext="Moved permanently">
<.cfheader name="Location" value="http://www.new-url.com">
PHP Redirect
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.new-url.com" );
?>
ASP Redirect
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www.new-url.com/"
%>
ASP .NET Redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>
JSP (Java) Redirect
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.new-url.com/" );
response.setHeader( "Connection", "close" );
%>
CGI PERL Redirect
$q = new CGI;
print $q->redirect("http://www.new-url.com/");
Ruby on Rails Redirect
def old_action
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.new-url.com/"
end
이것들 외에도 가장 많이 쓰이는 htaccess 방식이 있습니다.
검색엔진최적화 SEO에 대해서 궁금하신점이 있으시면 언제든지 문의 주세요. ( seomkt@naver.com )
'프로그램개발 > ServerSide(PHP,Node.js)' 카테고리의 다른 글
PHP CURL 예제 (0) | 2013.10.21 |
---|---|
PHP CURL 정리 (0) | 2013.10.21 |
referer 유지하며 페이지 리다이렉트 (0) | 2013.10.15 |
NFC의 진짜 문제는 보안이 아니라 패권입니다 (0) | 2013.09.12 |
오픈API 사이트(Open API) 모음 (0) | 2013.04.11 |