각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 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 10 / 57 pages
번호 제목 제목 조회 수 날짜날짜
575 [GitHub] github.io 페이지 만들기 파일 157 2015/09/04
574 [윈도우] hiberfil 파일 160 2015/09/10
573 Cloudflare SSL 설정 #클라우드플레어 파일 160 2017/08/17
572 [리눅스서버] 리눅스 하위 디렉토리가 얼만큼 쓰는지 확인하는 명령어 166 2017/04/13
571 [Nginx] https가 아닐 경우 https로 리다이렉트하는 방법 파일 170 2018/04/25
570 [기타] 마우스 캔버스 터치 사인 저장 173 2019/09/30
569 [브라우저] 파이어폭스 오른쪽 클릭 184 2015/11/21
568 [Nginx] NGINX REVERSE PROXY 189 2017/10/15
567 [사이트관리] 웹사이트 보안검사 멀웨어 체크 / 웹사이트 악성코드 검사방법 191 2019/03/01
566 [GitHub] warning: LF will be replaced by CRLF in hello1.txt. 194 2020/05/09
565 [엑셀] 엑셀 셀병합 단축키 만들기, 엑셀 병합 단축키 파일 195 2019/02/04
564 [사이트관리] 홈페이지에 옐로아이디 카카오톡 링크 추가하기 197 2015/08/21

해시태그 디렉터리

오늘의 핫게시물