2009-08-08 5 views
0

은 내가 RewriteRule의를 사용하는 경우 http://store.anotherdomain.com/memod_rewrite는 다른 도메인으로 리디렉션되는 것과 같은 역할을합니까? 재 작성하려면 어떻게해야합니까?

에 www.mydomain.com/store를 리디렉션 할 ^이 www.mydomain.com/store

에게 URL 변경을 의미하는 것이 아니라 남아있는, 리디렉션을 끝 $ http://store.anotherdomain.com/me 저장

다시 쓰기를 제대로 수행하려면 무엇이 필요합니까?

다음 RewriteRule^next $/mydomain/subfolder/subfolder/subfolder를 사용하면 잘 작동하는 것 같습니다.

답변

2
RewriteRule ^store$ http://store.anotherdomain.com/me [P] 

참고 [P] 끝에. mod_proxy 모듈을 사용하도록 설정해야합니다.

2

mod_rewrite가 전혀 필요하지 않습니다.

mod_proxy를 활성화하고 reverse proxy을 구성해야합니다. 다른 도메인의 쿠키를 전달하여 사이트에서 온 것처럼 보이게 할 수도 있습니다.

ProxyPass /store/ http://store.anotherdomain.com/me/ 
ProxyPassReverse /store/ http://store.anotherdomain.com/me/ 
ProxyPassReverseCookieDomain store.anotherdomain.com www.mydomain.com 
ProxyPassReverseCookiePath /me/ /store/ 
관련 문제