简体   繁体   English

如何验证301重定向

[英]How to verify 301 redirect

Other than having to install something like Fiddler on my server, after adding a redirect in IIS, is there a log or something or a way built-in to show me that a valid 301 redirect took place other than seeing it redirect at runtime? 在IIS中添加重定向之后,除了必须在服务器上安装Fiddler之类的东西之外,是否有日志或内置的东西或方法向我显示发生了有效的301重定向,而不是在运行时看到了重定向? I guess what I want is true proof so that I can verify it's really doing the 301 for SEO even though I did state in IIS in the redirect module to 301 redirect as the kind of redirect. 我想我想要的是真实的证明,这样我就可以验证它确实在针对SEO执行301,即使我确实在IIS中将重定向模块中的状态指定为301重定向也是如此。 I don't trust the UI until I can verify the response if you know what I mean. 如果您知道我的意思,我将不信任UI,直到我可以验证响应为止。 The worst case I guess I could install fiddler and watch the header. 我猜最坏的情况是我可以安装提琴手并观看表头。

TELNET to your server on port 80. Type the following: TELNET到端口80上的服务器。键入以下内容:

GET /your.url HTTP/1.1
Host: your.hostname.here

Follow it with two blank lines, and you should see the response in your telnet window. 在其后跟随两个空白行,您应该在telnet窗口中看到响应。 If the first line of response headers looks something like HTTP/1.x 301 MOVED PERMANENTLY , then its working. 如果响应标头的第一行看起来像HTTP/1.x 301 MOVED PERMANENTLY ,则它正常工作。

EDIT: Of course, nobody should actually use telnet anymore, when we have tools like PuTTY available. 编辑:当然,当我们拥有类似PuTTY的工具时,没有人应该再实际使用telnet。

Fiddler isn't installed on your server. 您的服务器上未安装Fiddler。 you install it on the the client. 您将其安装在客户端上。 I'd use fiddler, or the net tab of firebug . 我会用提琴手或firebug的net选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM