주소표시에서 /index.php 제거하는 방법

홈페이지 인덱스화면에서 주소표시줄에 도메인만 나오도록 설정하고 싶습니다.

my-domain.com/index.php

에서 뒤에 index.php 제거

찾아보니 .htaccess에서 한다고 해서

아래와 같이 했는데 안되네요.. (www를 고정하는건 잘 됩니다.)

Copy
<ifmodule mod_rewrite.c> RewriteEngine OnRewriteBase / # www 서브도메인을 항상이용RewriteCond %{HTTP_HOST} !^www\.RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] RewriteCond $1 !^(index\.php|images|robots\.txt)RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ /index.php?/$1 [L] </ifmodule>


그누보드 5, 영카드 사용했고

호스팅은 UTF-8 (PHP5.3, MySQL5.x) 입니다.

답변 1개 / 댓글 2개

기존 index.php를 index2.php로 이름을 바꾸고 index.php를 아래와 같이 해주세요.

<?
$LastModified = gmdate("D d M Y H:i:s", filemtime($HTTP_SERVER_VARS[SCRIPT_FILENAME]));
header("Last-Modified: $LastModified GMT");
header("ETag: \"$LastModified\"");
?>

<html>
<head>
</head>
<frameset rows="0,*" border=0>
 <frame src="blank.php" name="blank">
 <frame src="index2.php" name="main">
</frameset>
</html>  

답변에 대한 댓글 2개

그누보드5는 html5기반이고 html5에서는 프레임셋은 지원하지 않는 퇴화 태그로서 프레임셋을 사용하는 방법은 장래를 봐서는 사용하는 것이 좋지는 안다고 보여집니다.
redangel 님 답변 감사합니다.
아이프레임으로 씌우는 건 제가 원하던 방향성은 아닌거 같아서
좀 더 찾아봐야겠네요

port님 의견 감사합니다.

답변을 작성하려면 로그인이 필요합니다.