Redirecting a specific page to another domain

后端 未结 2 679
误落风尘
误落风尘 2021-01-25 02:15

I recently created a new site on a different domain. I need to redirect the index.html of the old domain to the index of the new domain.

Usually this would

2条回答
  •  青春惊慌失措
    2021-01-25 02:34

    JAVASCRIPT REDIRECT:

    Paste this at the top of your page on the old site just after the tag.

    
    

    Naturally, you'd replace "http://www.newsite.com/" with wherever you wanted the page to redirect to.

    It should redirect you instantly. So anyone visiting the old site page will instantly redirect to newsite.com

    PHP REDIRECT (301, permanently moved):

    
    

    Place that at the top of your page. It isn't as nice as the javascript one, but it is SEO FRIENDLY, which I think you're looking for.

提交回复
热议问题