|
|
|
자주 묻는 질문
|
|
Read No. 55 article |
2019-07-12 23:07:26 |
|
|
|
|
NickName |
풀비누 |
Subject |
특정 페이지로의 URL 포워딩 방법은? |
|
|
URL 포워딩 하는 방법 입니다.
보통 index.htm 에서 하부 디렉토리로 연결하거나 외부 주소
연결할 때 이용됩니다.
1. 메타태그를 이용한 방법
<meta http-equiv="Refresh" content="0; URL=http://abc.co.kr">
-------> abc.co.kr 로 연결
<meta http-equiv="Refresh" content="0; URL=/tt/">
-------> /tt 폴더로 연결
2. 자바스크립트를 이용한 방법
<script>document.location="http://abc.co.kr";</script>
<script>document.location="/tt/";</script>
3. PHP 를 이용한 방법
<? header("Location:http://abc.co.kr"); ?>
<? header("Location:/tt/"); ?>
4. .htaccess 의 rewrite rule 을 이용하는 방법
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?(YourDomain\.com)
RewriteRule ^(/)?$ tt [L]
기타. 익스플러러 주소창에 도메인 명만 나오도록 하고 플때.
public_html/index.htm 파일을 프레임 파일로 구성하시고 해당 파일
에서 하부 경로를 불러오시면 됩니다.
예제 index.htm -------------
<html>
<head>
<title>타이틀</title>
</head>
<frameset rows="100%,*" border=0>
<frame name="frame" src="/tt/index.htm"></frame>
</frameset>
</html>
--------------------------
위 예제는 tt 폴더안의 index.htm 파일을 열도록 하는 예제입니다.
|
|
Page Loading [ 0.02 Sec ]
SQL Time [ 0 Sec ]
|
|
|