Redirect all urls exactly, just change domain name

前端 未结 3 727
野性不改
野性不改 2021-01-01 19:15

I have a website with roughly 1K URLs. The website is moving to a different domain name. The URLs will be the exact same though, otherwise. I\'d like to incorporate an htacc

3条回答
  •  盖世英雄少女心
    2021-01-01 19:45

    With www or without

    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} (w*)domain\.com$ [NC]
    RewriteRule ^ http://newdomain.com%{REQUEST_URI} [L,R=301]
    

提交回复
热议问题