각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 https://imweb.eond.com/webtip/163751
<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www.eond.com)(:80)? [NC]
RewriteRule ^(.*) http://eond.com/$1 [R=301,L]
order deny,allow

.htaccess 파일에 RewriteEngine On에서 위와 같이 수정하면 됩니다.

이전에는 index 파일에서


$host_name = $HTTP_HOST;
if($host_name == "www.eond.com") header("Location:http://eond.com");
   
이렇게 추가했었는데 XE의 인덱스 파일에서는 제대로 먹히질 않더군요. 그래서 .htaccess 파일을 수정해주었습니다.


현재 이온디의 .htaccess 파일은 다음과 같습니다.


RewriteEngine On


RewriteCond %{HTTP_HOST} ^(www.eond.com)(:80)? [NC]

RewriteRule ^(.*) http://eond.com/$1 [R=301,L]

order deny,allow


RewriteBase /

RewriteCond $1 !^(is)/

RewriteCond %{HTTP_HOST} ^is\.eond\.com [NC]

RewriteRule ^(.*)$ /is/$1 [L]


RewriteCond %{HTTP_HOST} ^(mynote.eond.com)(:80)? [NC]

RewriteRule ^(.*) http://me.eond.com/$1 [R=301,L]

order deny,allow


#RewriteCond $1 !^(mynote)/

#RewriteCond %{HTTP_HOST} ^mynote\.eond\.com [NC]

#RewriteRule ^(.mynote)?$ ./index.php?mid=mynote [L]


RewriteCond $1 !^(me)/

RewriteCond %{HTTP_HOST} ^me\.eond\.com [NC]

RewriteRule ^(.me)?$ ./index.php?mid=mynote [L]


#RewriteRule ^(.*)$ http://eond.com/mynote/$1 [L]



코멘트 1
접기/펴기 | 댓글 새로고침
  • 홍땍땍
    감사합니다.^^!
    오전 09:32
    댓글
 
 
Total 683 articles in 24 / 57 pages
번호 제목 제목 조회 수 날짜날짜
407 DaulSoft - GoreWan 파일 5119 2008/12/25
406 책 블로그 4164 2008/12/27
405 북토피아 e-book 뷰어 프로그램(Vista) 7116 2008/12/28
404 [X61] 빨콩이 저절로 움직인다 10952 2009/01/01
403 [X61] 이제는 다시 브라우저 키로 글을 날려먹지 말자. 파일 9942 2009/01/01
402 [사이트관리] 검색로봇 robot.txt 작성 [2] 11971 2009/01/05
401 [브라우저] 크롬을 좀 더 편리하게 사용할 수 있는 방법은 없을까? 9567 2009/01/06
400 [윈도우] 윈도우 설치 후 사용 준비 과정 11986 2009/01/11
399 [윈도우] 윈도우 설치 후 필수 프로그램(ver.3) 14282 2009/01/11
398 [윈도우] 노트북 사용자의 필수 프로그램 12800 2009/01/11
397 [윈도우] 내 컴퓨터 드라이버 설치하기 11682 2009/01/11
396 [미디어/녹음·재생] 프로디지 녹음하기 9550 2009/01/11

해시태그 디렉터리

오늘의 핫게시물