可能重复:
.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 *子目录,则不会有文件放置此代码。 –