服务热线
15639981097
很早以前河南网站建设介绍过《Z-Blog 怎么实现301重定向的方法教程》,但该z-blog博客301重定向的方法不能实现全站301重定向,只能实现首页301重定向,这对于SEO来说是个很大的损失。河南网站建在逛博客的时候,发现有z-blog博主更换域名并实现了全站301重定向,所以把教程整理过来分享。不过该方法好像只能在win 2008系统的服务器生效。
实现z-blog全站301重定向的方法:
创建web.config文件,添加下面的代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <rewrite> <rules> <rule name="Canonical Host Name" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^boke8.net\.net$" /> </conditions> <action type="Redirect" url="http://www.boke8.net/{R:1}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer></configuration> |
把河南网站建设的域名boke8.net替换为自己的域名
保存文件后,上传到z-blog根目录即可实现z-blog全站301重定向。
提示:检测301重定向是否成功可以通过页面HTTP状态查询工具查看返回状态码是否是301。
燕山网络科技 https://www.hnysnet.com/zblogcn/1419.html 转载需授权!
2021-01-11
2020-12-18
2020-12-06
2020-12-06
2020-11-28
zblogphp的安装过程非常简单,但是对于没有使用过zblogphp的朋友...
<table><tbody> ...
扫一扫二维码,添加客服微信
(¬_¬) 还不快点抢沙发!!!