2016-09-24 158 views
0

如何在不更改URL的情況下將class.11talk.net重定向到http://eng.pinestalking.com/home/eng/index/index.html將子域重定向到不同的子域而不更改網址

由於當前我有htaccess的重定向設置子域class.11talk.net如下:

RewriteCond %{HTTP_HOST} ^class\.11talk\.net$ [OR] 
RewriteCond %{HTTP_HOST} ^www\.class\.11talk\.net$ 
RewriteRule ^/?$ "http\:\/\/eng\.pinestalking\.com\/home\/eng\/index\/index\.html" [R=301,L] 

301重定向是容易的,但現在我想要的網址,以保持作爲class.11talk.net但顯示器作爲代理人的http://eng.pinestalking.com/home/eng/index/index.html的內容。

這兩者顯然不是來自同一臺服務器。

+0

沒有必要轉義替換網址中的任何內容。所以只要寫'http:// eng.pinestalking.com/home/eng/index/index.html' –

+0

碰巧,我最近回答了類似的問題,請參閱http://stackoverflow.com/a/39574451/1741542 –

回答

0

使用一個完整的頁面iframe,.tk做了多年,它工作正常。

除此之外,將DNS記錄指向其他服務器並將其配置爲在該域名下託管該目錄。

+0

class.11talk.net是響應式的,我使用了像你推薦的iframe,它會違背這一點。 – Windee