본문 바로가기
web

사이트 주소 고정하는 법

by vamalboro 2008. 5. 14.

보통 가장 처음 들어가는 메인페이지는 index.확장자로 이루어져 있다.

이 파일의 이름을 main.확장자(예)로 바꾸어 준 후 본래 index.확장자파일을 아래와 같이 만든다.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml1" lang="ko" xml:lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr" />
<meta name="Generator" content="EditPlus" />
<meta name="Author" content="Lee Bum Hy" />
<title> 홈페이지 타이틀 </title>
</head>

<frameset rows="*" cols="*" framespacing="0" frameborder="no" border="0">
 <frame src="main.jsp" name="index" scrolling="yes" noresize>
</frameset>
<noframes>
<body></body>
</noframes>

</html>

위와같이 frameset으로 main.확장자를 불러온다.
중요한건 frameset태그는 절대로 body안에 쓰면 안된다.

body안에 태그가 들어가게되면 아무것도 출력되지 않는다.
body는 noframe으로 감싸준다.