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

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

QA

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

본문

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

my-domain.com/index.php

에서 뒤에 index.php 제거

 

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

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

 


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


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

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

 

 

 

이 질문에 댓글 쓰기 :

답변 1

기존 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>  

그누보드5는 html5기반이고 html5에서는 프레임셋은 지원하지 않는 퇴화 태그로서 프레임셋을 사용하는 방법은 장래를 봐서는 사용하는 것이 좋지는 안다고 보여집니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 17
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT