각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 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 27 / 57 pages
번호 제목 제목 조회 수 날짜날짜
371 [하드웨어] 노트북 복구기 8516 2009/06/16
370 [하드웨어] 휴대용 스피커 구매 : Kalon KS-18 8142 2009/06/27
369 [하드웨어] CPU 이야기 7227 2009/06/27
368 [하드웨어] PC 구매하기 8494 2009/06/30
367 [사이트관리] robots.txt 작성방법 11210 2009/07/01
366 [메신저] MSN 자동 로그인 해제하기 9623 2009/07/31
365 [하드웨어] SD카드 복구하기 [1] 16643 2009/08/04
364 [웹로그] 사이트바 디자인 모음 파일 6952 2009/08/12
363 [웹로그] 내가 사용하는 프로그램 6789 2009/09/11
362 [웹로그] 이온디 파비콘 만들기 6973 2009/09/11
361 [웹로그] 애드센스 6377 2009/09/19
360 [하드웨어] 소켓 939 보드 구하기 9692 2009/09/21

해시태그 디렉터리

오늘의 핫게시물