[완료]mod_rewrite : domain.com/aaa 을 접속하면 aaa.domain.com 으로 되게 하는 방법??

dopekly의 이미지

제 설정은 현재 이렇습니다.

ServerAdmin root@localhost DocumentRoot /home ServerName domain.com

RewriteEngine On
RewriteRule ^/home/aaa$ ^http://aaa\.domain\.com$

ErrorLog /usr/local/apache/logs/error_log
CustomLog /usr/local/apache/logs/access_log common

그런데 domain.com/aaa로 접속하면 IE 주소창에 그냥 domain.com/aaa로 접속이 됩니다.
제가 원하는 aaa.domain.com으로 되지 않습니다.

어떻게 조언 좀 구할 수 없을까요?? --;;

송효진의 이미지

RewriteRule ^/aaa <a href="http://aaa.domain.com/
" rel="nofollow">http://aaa.domain.com/
</a>

대충 해 봤습니다.

emerge money

kall의 이미지

rewrite의 경우는 주소창을 그대로 두면서 읽어들이는 페이지를 바꾸는 모듈이고..
주소 자체를 바꾸려면 redirect로 페이지를 이동시키는 수 밖에는..

----
자신을 이길 수 있는자는
무슨짓이든 할수있다..
즉..무서운 넘이란 말이지 ^-_-^
나? 아직 멀었지 ㅠㅠ

----
자신을 이길 수 있는자는
무슨짓이든 할수있다..
즉..무서운 넘이란 말이지 ^-_-^
나? 아직 멀었지 ㅠㅠ

송효진의 이미지

아, 안되는거였나요?
안되는 거라면 이렇게 하면 되겠군요.

RewriteRule ^/(aaa)$ /redirect.php?target=$1 [QSA,NS,L]

emerge money