각종 팁&정보를 나누는 곳입니다.
누군가에게 도움이 된다 싶으시면 언제라도 포스팅 :)
글 등록하기 | 내글 관리하기 | 연재글 | 보관함
이온디
첨부파일 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 55 / 57 pages
번호 제목 제목 조회 수 날짜날짜
35 [웹 제작] css hover underline center to side 67 2020/04/16
34 [리눅스서버] 리눅스 iptables IP 차단 69 2020/04/16
33 [윈도우서버] xampp 로컬테스트 계정 생성 118 2020/04/20
32 [윈도우서버] [xampp] rhymix 라이믹스 설치 파일 537 2020/04/20
31 [GitHub] warning: LF will be replaced by CRLF in hello1.txt. 194 2020/05/09
30 [기타] 오픈소스 라이센스에 대하여 322 2020/05/09
29 [리눅스서버] HTTP 웹 성능 개선하기 228 2020/07/02
28 [윈도우] Windows 10 사용 중 DISM 도구 사용 시 0x800f081f 오류 파일 826 2020/07/29
27 [윈도우] 오류 CLOCK_WATCHDOG_TIMEOUT : 발생 원인 및 방법 파일 1667 2020/07/29
26 [윈도우] 윈도우 데스크톱 200% 활용하기: 무료 툴 Top 25 200 2020/07/29
25 [윈도우] svg viewer - 탐색기에서 바로 svg 아이콘 이미지로 보는 방법 888 2020/08/10
24 비밀글 무료환율 api 0 2020/08/18

해시태그 디렉터리

지금 이순간

오늘의 핫게시물