1
谷歌已收錄subdomain.thedomain.com/directory重定向從子域目錄根
我想要重定向到thedomain.com
.htaccess文件中善有善報?我發現所有其他組合,但這
請幫助!
在此先感謝,非常感謝
谷歌已收錄subdomain.thedomain.com/directory重定向從子域目錄根
我想要重定向到thedomain.com
.htaccess文件中善有善報?我發現所有其他組合,但這
請幫助!
在此先感謝,非常感謝
你沒有找到正確的文檔。閱讀:
http://httpd.apache.org/docs/2.4/en/rewrite/remapping.html#movehomedirs
更新:
作爲開始,寫爲directory/.htaccess
:
RewriteEngine on
RewriteRule .* http://thedomain.com/ [R,L,NE]
的.*
意味着什麼,因爲規則來自於.htaccess
文件,這實際上意味着任何東西在這個二教區。
總的來說,這意味着:使用括號中的選項(這將正常工作)將該目錄中的任何內容重定向到主頁。
這並不告訴我如何重定向到根...至少我不認爲 - 這太難理解了,這就是我來到這裏的原因。誰能幫我嗎? –
所以你想重定向'http:// subdomain.thedomain.com/directory/*'到主頁'http:// thedomain.com /',不管'*'是什麼?然後,從文檔中的示例中刪除'$ 1'。或者,如果您的意思是別的,請在您的問題中提供更多示例。 –
是的。 'http:// subdomain.thedomain.com/directory /'重定向到'http:// thedomain.com'。 *是無關緊要的,因爲google上只有這一頁來重定向。我使用哪個示例?我很抱歉,這是一個完整的新手,我失去了甚至要開始的地方。你能爲我輸入嗎? –