我有一个有趣的问题,HTTPS 端口没有得到正确处理。这是一个相对较小的问题,我敢打赌解决起来很简单,我只是没有想到它。
我们有一个使用 IIS 6 提供服务的网站,www.mylongdomainname.com。我们有一个安全门户,通过 https://www.mylongdomainname.com 进行处理。现在我们有几个通过电话使用的虚荣和营销 URL,例如 www.shortname.com 等。我设置了两个网站,其中一个处理所有带有 www.mylongdomain.com 标头的请求,该标头实际上为该网站提供服务。另一个接受任何流量并永久重定向到 www.mylongdomain.com。这样,如果我们添加更多域名,它们最终都会到达同一个,并且会将 mylongdomain.com 重定向到 www.mylongdomain.com。
这里一切都运转良好。现在的问题是,当我搜索“shortname.com”时,返回的第一个结果与我搜索“mylongdomain”时的结果相同,但是,谷歌已经能够通过 https://shortname.com 并以这种方式索引它们。我们没有这些其他域的 SSL 证书,因此当您点击时,您会收到令人讨厌的不受信任错误。
如果我们不通过电话使用这些 URL,这确实不会成为问题,而且你们都知道有多少人不知道 URL 栏和搜索框之间的区别。
有什么建议或提示吗?
I have an interesting issue with HTTPS ports not being handled properly. It is a relatively small issue and I bet it is pretty simple to solve, I am just not thinking of it.
We have a website served with IIS 6, www.mylongdomainname.com. We have a secure portal which is handled via https://www.mylongdomainname.com. Now we have several vanity and marketing URLs that we use over the phone like www.shortname.com, etc. I have two websites setup, one that handles all request with the header www.mylongdomain.com which actually serves the website. The other accepts any traffic and permanently redirects to www.mylongdomain.com. This way if we ever add any more domains, they will all end up at the one, also it redirect mylongdomain.com to www.mylongdomain.com.
Everything here works fine. The issue now is when I google "shortname.com," the first result returned is the same as if I were googling "mylongdomain" however, google has been able to crawl the other pages via https://shortname.com and index them that way. We dont have SSL certificates for these other domains, so when you click through, you get a nasty un-trusted error.
This really wouldn't be an issue if we didn't use these URLs over the phone, and you all know how many people don't know the difference between the URL bar and a search box.
any suggestions or tips?
发布评论
评论(1)
我设置了一个重定向,以便将 https://shortname.com 发送到 http://shortname.com 带有 301(永久)重定向。这将立即结束令人讨厌的不受信任的错误。此外,这也会导致谷歌缓慢而坚定地更新他们的索引。
有多种方法可以做到这一点。如果您使用的是 IIS7,则可以使用 URL 重写模块 并编写重定向规则以获取照顾它。
或者,如果您不在 IIS7 上,则编写一些代码来完成此操作可能是完全可以接受的。我 编写了一些我使用过的 ASP.NET有很多次来处理此 HTTP/HTTPS 重定向。在您的特定情况下,您可以简单地采用我的代码并在 global.asax 的 Application_BeginRequest 函数中调用 SetSSL(False) 。
I'd set up a redirect so that https://shortname.com is sent to http://shortname.com with a 301 (permanent) redirect. This will put an end to the nasty untrusted error immediately. Furthermore, this will also cause Google to slowly but surely update their index.
There are multiple ways to do this. If you're using IIS7 you can use the URL Rewrite Module and write a redirect rule to take care of it.
Or if you're not on IIS7 it may be perfectly acceptable to write some code to accomplish this. I wrote some ASP.NET I've used plenty of times to take care of this HTTP/HTTPS redirection. In your particular case you could simply take my code and call SetSSL(False) in the Application_BeginRequest function of your global.asax.