[英]redirect subdomain traffic to my main domain
我已将我的wordpress博客从https://blog.example.com迁移到https://www.example.com/blog ,一切正常。
现在我主要担心的是,谷歌已经将以前的网址编入索引,以便我如何将我的https://blog.example.com/post-name重定向到https://www.example.com/blog/post-name 。
重定向谷歌使用htaccess存档的旧ULR,谷歌将知道你做了这个改变。
# This will red`irect a subdomain to the main domain
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursubdomain\.yourdomain\.com$ [NC]
RewriteRule ^(.*) http://www.yourdomain.com/$1 [L,R=301]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.