각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 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 8 / 57 pages
번호 제목 제목 조회 수 날짜날짜
599 [리눅스서버] 리눅스 디렉토리별 용량 체크하는 방법 114 2020/11/26
598 [리눅스서버] 리눅스 마운트 퍼미션 117 2017/06/17
597 [윈도우서버] robots.txt 인식이 안될 경우. 파일 118 2019/02/27
596 [윈도우서버] xampp 로컬테스트 계정 생성 118 2020/04/20
595 [리눅스서버] nginx upstream 성능 최적화 120 2017/04/24
594 [리눅스서버] 서버 locale 설정 122 2017/03/31
593 [윈도우] 갑자기 윈도우10 알트탭(alt + tab)이 정상 사용 안될 때 확인 및 처리 방법? : 네이버 포스트 (naver.com) 124 2023/03/17
592 [리눅스서버] adduser 원하는 디렉토리에 유저 생성하기 126 2017/06/23
591 [엑셀] 엑셀 vba 공부할 수 있는 사이트 126 2019/02/04
590 [jQuery] 텍스트 추출해서 링크 변환하기 130 2021/12/25
589 [텔넷] tar, bz2 압축 과 압축해제 131 2017/06/07
588 [브라우저] 브라우저 중복 즐겨찾기 정리 프로그램 135 2015/10/06

해시태그 디렉터리