답변 2개 / 댓글 3개
다음과 같은 방법도 있으니 참고해 보세요
서버운영시
Copy
<VirtualHost *:80>
ServerName xxx.co.kr
Redirect / http://xxx.co.kr/groboard5/
</VirtualHost>
웹호스팅 사용시
.htaccess 파일에 추가
Copy
RewriteEngine On
RewriteCond %{HTTP_HOST} ^xxx\.co\.kr$ [NC]
RewriteRule ^(.*)$ http://xxx.co.kr/groboard5/$1 [R=301,L]
저는 인덱스 파일에
이런식으로 사용하고 있어요.
<?php
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: https://xxx.co.kr" );
// or
header("Location: https://xxx.co.kr/groboard5", true, 301);
?>
답변을 작성하려면 로그인이 필요합니다.

