Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
on godaddy in dns management ,in forwarding domain section i have set something like xyz/abc/form.cshtml . Now url is opening by this path but error is giving too many redirect urls or 502 bad gateway.

What I have tried:

on godaddy in dns management ,in forwarding domain section i have set something like xyz/abc/form.cshtml  . Now url is opening by this path but error is giving too many redirect urls or 502 bad gateway. 
Posted
Updated 5-Dec-18 6:59am
Comments
F-ES Sitecore 5-Dec-18 11:43am    
You are getting into an infinite redirect loop, so something is either redirecting to itself, or pagea is redirecting to pageb which is redirecting to pagea. Something like that, it's impossible for us to say from what you've posted. The very fact that you seem to be treating cshtml files as pages you can navigate to shows you obviously have some problem somewhere.

1 solution

You appear to have multiple problems here:

1. ASP.NET MVC uses routing to direct a URL to a Controller and run a specific action. It was not designed to navigate directly to a View. You will need to verify that your routes are setup properly and that you cannot navigate that way. Allowing it is also a security risk.

2. GoDaddy redirect should be adjusted to go a specific route; either the default or something special if warranted.

3. And then there is the "too many redirects" issue. There are a multitude of problems that could cause this, I can only give you frequent ones I have seen:

- HTTP & HTTPS. The site may not have an SSL and only support HTTP, and there is an upgrade header conflicting.

- Sessions. Browser detection on Session_Start, and redirect to mobile page. If the device is locked down and doesn't accept cookies, Session_Start will fire on each request and redirect you.


I would take care of items 1 & 2 first. When you get to #3 I would use the browser-inspector to watch the network activity to see where you are looping from and to
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900