我们在URL中将4个URL重定向到单个URL时遇到问题。
以下是我们需要的映射。
输入的网址 - >目标网址 example1.com - > example1.com www.example1.com - > example1.com example2.com - > example1.com www.example2.com - > example1.com
我们在WIn Srv 2008 SP1上使用IIS7。
我们现在已经在IIS中设置了所有绑定。 我们有HTTPS。 但是对于目标URL选项,我们拥有有效的证书。 所有其他选项都显示为“此连接不受信任”,用户必须手动单击“继续浏览”网站。 我们希望将用户重定向到所需的站点,即使用户键入任何URL也是如此。 我的意思是浏览器中用户的URL应该更改为目标URL,并且应该打开安全连接。
我在google搜索后找到了URL Redirect 2.0。 这会解决我的问题。 它是安全的还是有任何问题涉及到这一点。
没有安装任何更好的选择。
TIA
Arun Kumar Allu。
We are facing problems in URL Redirecting 4 URL's to a single URL.
The following is the mapping we need.
Entered URL -> Target URL example1.com -> example1.com www.example1.com -> example1.com example2.com -> example1.com www.example2.com -> example1.com
We are using IIS7 on WIn Srv 2008 SP1.
We now have all the bindings set in IIS. We have HTTPS. But for only the Target URL option we are having a valid certificate. All the rest of the options are shown as "This Connection is Untrusted" and the user has to manually click on the proceed to website. We want to redirect the user to the desired site even if the user types any of the URL's. I mean the User's URL in the browser should change to the target URL and the secured connection should open.
I have found URL Redirect 2.0 after googling for this. Will this solve my problem. Is it safe or is there any gotcha's involved in this.
Any better option without installing any.
TIA
Arun Kumar Allu.
最满意答案
我假设你安装了IIS“URL Rewrite”模块,如果是这样,那么使用这些重写规则:
<rule name="AllToExample1Http" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.example1\.com$|^example2\.com$|^www\.example2\.com$" /> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="http://example1.com/{R:1}" /> </rule> <rule name="AllToExample1Https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.example1\.com$|^example2\.com$|^www\.example2\.com$" /> <add input="{HTTPS}" pattern="^ON$" /> </conditions> <action type="Redirect" url="https://example1.com/{R:1}" /> </rule>I assume you have IIS "URL Rewrite" module installed, if so, then use these rewrite rules:
<rule name="AllToExample1Http" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.example1\.com$|^example2\.com$|^www\.example2\.com$" /> <add input="{HTTPS}" pattern="^OFF$" /> </conditions> <action type="Redirect" url="http://example1.com/{R:1}" /> </rule> <rule name="AllToExample1Https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www\.example1\.com$|^example2\.com$|^www\.example2\.com$" /> <add input="{HTTPS}" pattern="^ON$" /> </conditions> <action type="Redirect" url="https://example1.com/{R:1}" /> </rule>更多推荐
URL,We,用户,目标,IIS,电脑培训,计算机培训,IT培训"/> <meta name="description&
发布评论