試圖在StackOverflow中搜索很多,但沒有解決我的問題。重定向而不更改顯示的URL
我在服務器中獲得了一個域(我們稱之爲mydomain.com)和一個名爲mydomain.com/subdomain的子域。我將DNS配置爲重定向,所以當我寫www.subdomain.com時,它會將我帶到www.mydomain.com/subdomain。
有沒有一種方法(通過DNS,CNAME,.htaccess,別的?)來執行我的重定向,但讓我的瀏覽器仍然在URL欄中顯示www.subdomain.com?
對不起,我的英文不好
你可以使用[ProxyPass](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass),al你可以用[mod_rewrite P標誌](https://httpd.apache.org/docs/current/rewrite/flags.html#flag_p)來做,但是由於性能方面的原因,建議使用proxypass。 –
您的問題存在錯誤。在諸如subdomain.example.com/subdirectory/的URL中,子域是「子域」,子目錄是「子目錄」(有時也稱爲文件夾)。如果你還不清楚看到這個https://www.mattcutts.com/blog/seo-glossary-url-definitions/ 從https://www.mattcutts.com/blog/subdomains-and-subdirectories/ – javidazac