각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 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 9 / 57 pages
번호 제목 제목 조회 수 날짜날짜
587 [윈도우서버] 윈도우 서버 2016 135 2017/04/17
586 [wnmp] XE 설치하기 파일 137 2020/01/11
585 [Apm] WT-NMP - portable Nginx Mysql Php development stack for Windows 142 2015/11/17
584 [리눅스서버] MySQL 관련 오류 142 2017/06/21
583 [MySQL] MySQL 기본적인 사용방법 143 2017/10/20
582 [가상윈도우] 가상서버에서 apm 설치하는 방법 등 145 2016/02/03
581 [리눅스서버] ./configure : /bin/sh^M : bad interpreter [duplicate] 파일 145 2018/07/29
580 [윈도우] 윈도우가 설치된 노트북에 새로운 윈도우 설치 후 정품인증하기 147 2017/09/08
579 [리눅스서버] 아파치 재시작/아파치 리로드 149 2017/03/20
578 [기타] 사진 출력 해상도|작성자 잉고래 152 2015/11/28
577 [MySQL] Mysql Join 해부(Left, Right, Outer, Inner Join) 154 2018/01/03
576 [텔넷] [MySQL] 컬럼 검색하는 방법 파일 155 2016/02/18

해시태그 디렉터리

오늘의 핫게시물