重定向旧网站使用htaccess的新网站 [英] redirect old site to new site using htaccess

查看:115
本文介绍了重定向旧网站使用htaccess的新网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助htaccess的。我需要重定向我的旧网站到一个新的站点。 如果有人访问旧的网站,它会重定向到我的新网站。我怎么能实现,使用htaccess的? 谢谢

但你知道一个简单的code做这样的事情。例如我的旧网站的网页是www.old.com/homerun.html重定向到新的页面,www.new.com/homerun/,www.old.com/themes/newpage.html到www.new.com/themes / NEWPAGE /,所以基本上它会替换域名和删除的.html

解决方案

 重定向301 / http://www.example.com/
 

这是应该做的呢?

Please help with htaccess. I need to redirect my old site to a new site. if anyone visits the old site, it will redirect to my new site. how can I implement that using htaccess? Thanks

but do you know a simple code to do something like this. for example my old site pages is www.old.com/homerun.html to redirect to new page, www.new.com/homerun/, www.old.com/themes/newpage.html to www.new.com/themes/newpage/ , so basically it will replace the domain and remove the .html

解决方案

Redirect 301 / http://www.example.com/

That should do it?

这篇关于重定向旧网站使用htaccess的新网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆