可能重複:
.htaccess rewrite to redirect root URL to subdirectory更改我的所有網站鏈接:最好的方法是什麼?
我需要改變我的網站的所有鏈接(2455)。
將會有一個問題,當訪客(使用舊的鏈接)的頁面會404 page not found
我想重定向舊的鏈接頁面的新版本都來自谷歌。例如:
舊鏈接:
http://example.com/hotel/13234
http://example.com/hotel/132
http://example.com/hotel/323
http://example.com/page/about_us
http://example.com/page/contact
新鏈接:(添加 「博客」)域
http://example.com/blog/hotel/13234
http://example.com/blog/hotel/132
http://example.com/blog/page/about_us
http://example.com/blog/hotel/323
...
...
...
什麼是做到這一點的最好辦法後?
舊頁面無法正常工作,可以這樣做.htaccess?每個鏈接到我的網站將重定向,並添加博客域 – bosami
對不起,我的英語不好 – bosami
你有雞之前的雞蛋問題。如果文件被移動到* blog *子目錄,則不會有文件放置此代碼。 –