문제

도움을주기 위해 help.domain1.com을 맵핑하려고합니다. 나는 이것을 orservoice에서 보았다. 그들은 당신이 무언가를 맵핑 할 수있게 해주겠습니다 .yourdomain.com을 무언가에 uservoice.com으로 매핑 할 수 있습니다.

domain1.com에서 도와 드리기 위해 cname을 설정했습니다.

잘 작동하지만 도움을 열면 domain1.com이 도움을받는 대신 Domain2.com의 내용을 얻습니다.

일부 실험 후 나는 이것이 예상되는 행동이라는 것을 깨달았습니다.

그래서 내 질문은 domain2.com (또는 Domain1.com에서)에서 무엇을해야합니까? subdomain "help.domain2.com"의 내용을 help.domain1.com을 탐색 할 때 무엇을 표시해야합니까?

(Plesk를 사용하고 있고 OS는 Windows Server 2003입니다)

도움이 되었습니까?

해결책 3

I found the solution. One way would be to use a mod_rewrite rule on domain2.com and do a redirect if referrer is domain1.com. Or to assign a dedicated IP address.

다른 팁

나는 지난 며칠 동안 같은 문제에 직면했고 방금 해결책을 찾았습니다 ...

/etc/apache2/site-available/default에는 두 개의 가상 호스트가 있었는데, 첫 번째는 내 도메인에 대한 것이고 두 번째는 내 하위 도메인이었습니다. 내가해야 할 일은 가상 호스트 블록의 순서를 뒤집어 도메인 앞에 서브 도메인을 배치하는 것이 었습니다. :디

HTTP/1.1 uses the Host: header to figure out which site is being requested, should there be more than one site hosted on the same IP address.

You need to ensure that the second (target) web-server is configured to expect incoming HTTP requests with the original URI in them.

I am not 100% sure how to do this in windows but in apache you just need to setup a virtual host to redirect it from the main domain to your subdomain.

you do not say if you are using IIS or apache or what the webserver is.

I imagine that what you need to do is setup a new website in IIS (not a virtual directory) and in the website tab click on advanced and edit the entry in there so that the "host header name" is the subdomain you want.

Jon Hawkins

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top