드루팔에서의 리다이렉트 Redirect 구현 방법들

Comments

2 comments posted
3번째 ".htaccess를

3번째 ".htaccess를 수정하는 방법"에 나온 문법은
예제일 뿐입니다. 그래도 적용하면 곤란할 수도 있습니다.

Posted by 익명 on Fri, 2009-09-18 06:18
리라이트를 .htaccess에 설정한

리라이트를 .htaccess에 설정한 예입니다.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^aabbcc.com?$ [OR]
RewriteCond %{HTTP_HOST} ^www.aabbcc.com?$
RewriteRule ^(.*)$ http://aabbcc.com/ii/ [R=301,L]

aabbcc.com 사이트에 있는 drupal에 /ii를 붙이는 예입니다.
즉 aabbcc.com 또는 www.aabbcc.com에 오면 aabbcc.com/ii로 보내는 것입니다.
단, 이런 경우에 사전 준비가 2개 필요합니다.

1.드루팔 settings.php 는
[aabbcc.com의 drupal folder]/sites/aabbcc.com.ii
에 존재해야 합니다.

2. [aabbcc.com의 DocumentRoot folder]/ii로
[aabbcc.com의 drupal folder]에 심볼릭 링크를 겁니다.
즉 [aabbcc.com의 DocumentRoot folder]에 ii라는 심볼릭 링크가 있게 되고,
그걸 누르면 [aabbcc.com의 drupal folder]로 점프하게 해 주세요.

이상입니다.

Posted by palpal on Wed, 2011-02-02 23:32