<!--BeforeDocument(163751,4)--><div class="document_163751_4 rhymix_content xe_content"><div editor_component="code_highlighter" code_type="Xml" file_path="" description="" first_line="1" collapse="false" nogutter="false" nocontrols="false" style="font-family: tahoma; font-size: 12px; border-style: dotted dotted dotted solid; border-color: rgb(102, 102, 102) rgb(102, 102, 102) rgb(102, 102, 102) rgb(34, 170, 238); border-width: 1px 1px 1px 5px; padding: 5px; background-image: url(http://eond.com/modules/editor/components/code_highlighter/code.png); background-attachment: scroll; background-color: rgb(250, 250, 250); background-position: 100% 0%; ">&lt;Files ~ "^.(htaccess|htpasswd)$"&gt;<br />deny from all<br />&lt;/Files&gt;<br /><br />RewriteEngine On<br /><br />RewriteCond %{HTTP_HOST} ^(www.eond.com)(:80)? [NC]<br />RewriteRule ^(.*) http://eond.com/$1 [R=301,L]<br />order deny,allow<br /></div><br /><font face="tahoma">.htaccess 파일에 RewriteEngine On에서 위와 같이 수정하면 됩니다.</font><br /><br /><font face="tahoma">이전에는 index 파일에서 </font><br /><br /><div style="font-family: tahoma; font-size: 12px; "><br /></div><div style="font-family: tahoma; font-size: 12px; "><div>$host_name = $HTTP_HOST;</div><div>if($host_name == "www.eond.com") header("Location:<a href="http://eond.com/" onclick="window.open(this.href); return false;">http://eond.com</a>");</div><div>&nbsp;&nbsp;&nbsp; <br />이렇게 추가했었는데 XE의 인덱스 파일에서는 제대로 먹히질 않더군요. 그래서 .htaccess 파일을 수정해주었습니다.<br /></div></div><p style="font-family: tahoma; font-size: 12px; "><br /></p> <p style="font-family: tahoma; font-size: 12px; ">현재 이온디의 .htaccess 파일은 다음과 같습니다.</p> <p style="font-family: tahoma; font-size: 12px; "><br /></p> <blockquote class="q4"><p><p><font face="tahoma">RewriteEngine On</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">RewriteCond %{HTTP_HOST} ^(www.eond.com)(:80)? [NC]</font></p> <p><font face="tahoma">RewriteRule ^(.*) http://eond.com/$1 [R=301,L]</font></p> <p><font face="tahoma">order deny,allow</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">RewriteBase /</font></p> <p><font face="tahoma">RewriteCond $1 !^(is)/</font></p> <p><font face="tahoma">RewriteCond %{HTTP_HOST} ^is\.eond\.com [NC]</font></p> <p><font face="tahoma">RewriteRule ^(.*)$ /is/$1 [L]</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">RewriteCond %{HTTP_HOST} ^(mynote.eond.com)(:80)? [NC]</font></p> <p><font face="tahoma">RewriteRule ^(.*) http://me.eond.com/$1 [R=301,L]</font></p> <p><font face="tahoma">order deny,allow</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">#RewriteCond $1 !^(mynote)/</font></p> <p><font face="tahoma">#RewriteCond %{HTTP_HOST} ^mynote\.eond\.com [NC]</font></p> <p><font face="tahoma">#RewriteRule ^(.mynote)?$ ./index.php?mid=mynote [L]</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">RewriteCond $1 !^(me)/</font></p> <p><font face="tahoma">RewriteCond %{HTTP_HOST} ^me\.eond\.com [NC]</font></p> <p><font face="tahoma">RewriteRule ^(.me)?$ ./index.php?mid=mynote [L]</font></p> <p><font face="tahoma"><br /></font></p> <p><font face="tahoma">#RewriteRule ^(.*)$ http://eond.com/mynote/$1 [L]</font></p> <div style="font-family: tahoma; font-size: 12px; "><br /></div></p> </blockquote><p><br /></p></div><!--AfterDocument(163751,4)-->
<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 1