簡體   English   中英

該網頁具有重定向循環-IIS7

[英]This webpage has a redirect loop - IIS7

我有一個小網站,在iFrame中有一個郵件列表聯系表單,一旦提交,就會調用我在郵件列表服務中注冊的回調頁面,該頁面在iFrame中顯示並要求用戶檢查其電子郵件。 我注冊的頁面是http://mydomain.com/verify.html 在vertify.html中,我使用“ window.parent.document.getElementById('lightbox4')。style.display ='none';” 關閉包含I框架的燈箱div。 只要用戶最初訪問http://mydomain.com ,這一切都很好,但是如果用戶訪問http://www.mydomain.com ,則調用“ window.parent.document.getElementById('lightbox4')”。 style.display ='none';“ 不起作用,因為它是跨域請求。

因此,我認為沒有問題,我將創建一個重定向規則以將呼叫從www.mydomain.com轉換為mydomain.com。 但是,當我嘗試訪問www.mydomain.com或mydomain.com時,現在出現錯誤“此網頁具有重定向循環”。 在IIS7中,我有兩個綁定,一個用於mydomain.com,一個用於www.mydomain.com。 我的DNS區域在mydomain.com上有一個A記錄,在www.mydomain.com上有一個CNAME。

我在這里做蠢事嗎? 有什么方法可以調試嗎? 我可以在Firefox中看到,使用Live HTTP標頭插件將URL從www.mydomain.com正確重定向到mydomain.com,但是隨后嘗試繼續嘗試將mydomain.com重定向到mydomain.com,從而創建了無限循環:

http://www.mydomain.com/

GET / HTTP/1.1
Host: www.mydomain.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

HTTP/1.1 302 Redirect
Content-Type: text/html; charset=UTF-8
Location: http://mydomain.com/
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 21 Apr 2013 15:20:12 GMT
Content-Length: 150
----------------------------------------------------------
http://mydomain.com/

GET / HTTP/1.1
Host: mydomain.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

HTTP/1.1 302 Redirect
Content-Type: text/html; charset=UTF-8
Location: http://mydomain.com/
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 21 Apr 2013 15:20:12 GMT
Content-Length: 150
----------------------------------------------------------
http://mydomain.com/

GET / HTTP/1.1
Host: mydomain.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive

HTTP/1.1 302 Redirect
Content-Type: text/html; charset=UTF-8
Location: http://mydomain.com/
Server: Microsoft-IIS/7.0
X-Powered-By: ASP.NET
Date: Sun, 21 Apr 2013 15:20:12 GMT
Content-Length: 150
----------------------------------------------------------
and it keeps going until "This webpage has a redirect loop" is displayed

我希望我必須為www.mydomain.com創建一個新的虛擬目錄,然后將其重定向到mydomain.com,但這似乎很尷尬。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM