Examples of web sites with temporary 302 redirects

I would like to have examples of sites which have 302 redirects setup on them. One such example is google.com. The below is the response i get from google.com using the http-ping utility:
Reply: [302/Redirected] bytes=268 time=74ms
Haren MorseAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
Instead of providing example of sites, what is it you are looking for?
the HTTP error codes have explanation and meaning.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

The 302 is a conditional redirect

It might be easier and more importantly educational to setup your own web server, apache, IIs. and use the options there to alter the response of the webserver to requests....

This will provide a fuller picture of how and then the meaning of the message and the consequences of it.
0
Haren MorseAuthor Commented:
Thanks Arnold. I am not at all into web development or setting up a web site. I am suspecting that 302 redirects might be causing issues with browsing in an application. So I want examples of other web sites which have such a redirect setup
0
arnoldCommented:
a 302 is a redirect based on a request.
i.e. www.google.com redirects to a secure site often.
you can have http://www.somesite.com/somereference
right now you want this reference redirected, but not permanently, so you would use a 302 redirect. This way the web crawlers cataloging sites will not tag www.somesite.com/somereference as being redirected deleting this reference replacing by the destination. but instead will retain this reference as its redirect setting of today could change.

If you have issues browsing an application, it is best if you can identify the request, page you were on, what you clicked on when the issue arose. with this information, contacting the developer of the application or the support staff would provide them the info to track this issue.
The other is the issue comes up every time, or intermittently.

Looking at other implementations/usage would not help you resolve the issue you are seeing.

With a car example, if I try to start my car and it fails. Seeking example who tried to start their car and failed would not address/resolve the issue nor will it get me closer to a solution.
detail of the issue in your circumstance.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Haren MorseAuthor Commented:
I have a fair knowledge of the theory behind the redirects. I am the developer of the application and I am troubleshooting the issue. I am having a problem with only one particular link all the time. All the other links I tried work fine. This link has a 302 redirect on it. So I want to check whether this is causing the issue by trying other sites which have a 302 redirect on it.
0
arnoldCommented:
Ok, does your code issue a location redirect?
what is the symptom that you have and what the impact it causes?
a 302 merely retains the reference in the browser to the link so if you use relative links and redirect using 302 to a path where lets say the images the page needs to load, those images would potentially not be found and will reflect a broken image instead.


a 302 I believe by itself is not the item that causes your issue.

Check the destination to which this redirect sends the user, and look at the source of the data ......
see if you add a base href=explicit to this page and see whether that cures the issues you see/experience.
0
Olaf DoschkeSoftware DeveloperCommented:
What is your problem with the redirect?
Does it redirect to an unexpected target URI?
Does it not resubmit POST data? For example, that's normal to 302 or 303 redirects.

Does the problem only occur with one specific browser? Or are you even also using something else than a browser? cURL?
Correctly reacting to a redirect response is not automatic, browsers have the expected reaction implemented, but if you develop a client app you have to do that yourself. It's not the server redirecting you, the response is a status 302 and new URI, now it's your turn to repeat your request to that URI. Is it perhaps that? Are you thinking this should happen automatically and be handled by the server?

It's not routing, it's a status 302 response. If it would be routing, you wouldn't even know you're redirected, the response coming from elsewhere would still appear to you as coming from the URI you requested.

Bye, Olaf.
0
Haren MorseAuthor Commented:
This is happening with a Citrix application. If we set aside my application, code etc, a simple way to reproduce my problem would be:
1. Logon to a Citrix Desktop session on a Citrix Application Server
2. Enter the link in a Word File
3. Ctrl+Click on the link and the link should open in Client Browser because URL redirection is setup
4. This particular link is opening on the Server browser

* Every other link I tried opens up in the client browser.
* The site is responding with a 302 redirect when tried using the http-ping utility.
* The site is not blocked by the ValidSites registry key.
* The site is opening fine when tried directly in Chrome, Firefox and IE on both the server and client machine
0
Olaf DoschkeSoftware DeveloperCommented:
Ok, thanks for describing the situation.

If you click on a link in a word file, excel file, email, anywhere, this starts a browser, that's not about http redirection, anyway, what you describe you expect is even further away from what a 302 redirect can do to you. You want the link click to start a browser in the Client computer having the remote Citrix connection, then you want the Citrix software to cause an action in the client. This is not done by a 302 redirect.

I suggest you also tag your question Citrix and RDP, this needs some expert on this.

I'm used to Remote Destop an Windows Terminal Server and wouldn't even know how that would be set up. The remotely controlled PC session can know the client connected to it and also access clients resources, as far as they are shared, but causing a click within the remote desktop to cause a browser in the client, never heard of that feature.
0
Haren MorseAuthor Commented:
URL redirection is a Citrix feature and this of course doesn't have anything to do with a 302 redirect which is a completely different thing. The application is running on the Citrix server and clicks on any URL's will open the link in the Client's browser to save resources on the server. Citrix will perform a http ping first to see if the url is accessible from the client's PC. If that doesn't work the link is opened on the server browser.

The URL redirection is working fine with all the links I tried except for a particular link. So this doesn't look like a Citrix issue. I have eliminated all other possibilities I can think of like firewall etc. The only thing remaining is the 302 redirect on this link. All the other links I tried have 301 redirect on it. This is the reason why I wanted to find more links having 302 redirect on them.
0
Haren MorseAuthor Commented:
The reason why I am not tagging Citrix, RDP etc to this question is because I want to keep it simple and try to get suggestions on how I can get a list of links with 302 redirects by using a script or a web page source which has this information.
0
arnoldCommented:
unfortunately, I am unclear how you related the two as being the same.

I think your assumption might the issue, you might be equating things that are not the same.

an http redirect in a webbrowser will be treated one way, a similar redirect in a citrix environment while using similar terminology might not be the same.

see the citrix link dealing with a 302 redirect and settings that may help address or solve your issue.
https://docs.citrix.com/en-us/netscaler/11/traffic-management/load-balancing/load-balancing-protect-configuration/redirect-alternate-url.html
0
Haren MorseAuthor Commented:
The particular redirect in the link is used when one of the server hosting the application goes down. This won't help me in resolving the issue I have.

I understand the difference between Citrix redirect and browser redirect. Even if my assumption is wrong, my original question remains.
0
Dave BaldwinFixer of ProblemsCommented:
This article shows how to create your own 302 redirect for testing.  https://my.ultrawebhosting.com/knowledgebase/310/How-to-create-a-temporary-302-redirect-via-htaccess.html
0
Olaf DoschkeSoftware DeveloperCommented:
>Citrix will perform a http ping first to see if the url is accessible from the client's PC. If that doesn't work the link is opened on the server browser.

You teached me something new about Citrix inner workings, but I don't see how that mechanism would work with URLs, which are 302 redirected. A ping itself is TCP/IP and it is about ARP. I'll openly admit I'm not so much of a networking expert, but I'm very sure it's not using HTTP protocol and therefore wouldn't catch such redirects at all, anyway, as 302 redirects are only a http protocol feature. A ping request only ensures the availability of the remote node, the computer/domain overall, not a single URL.

If a redirect is used to go to a completely different domain, and that is available to clients, but the initial URLs domain is not, you most likely get what you see.

I can understand your logic, when 301 redirects are considered by this Citrix feature, that 302 should work the same. But aside of 301 vs 302, is the target URL of the redirect really having the nature of going through another domain? It's the norm you have 301 redirects from URL without www to URL with www as SEO friendly redirects to not let your site be indexed with double content, but this doesn't change domain, so the Citrix feature isn't influenced by it.

To ping it wouldn't make a difference at all. Unless you don't literally mean a ping but perhaps a HTTP HEAD vs GET request.
0
Haren MorseAuthor Commented:
Thanks  for trying to help me out with my problem. The ping that is performed is not an ICMP ping but done over http/https. The 302 redirect of the page is going to same page for some weird reason.

I already have a few utilities and know web sites like http://redirectcheck.com/index.php that can be used to test the http ping and redirects. I'll have to either run this manually on random websites until I get the reply I want or write a batch file that takes a text file with a lot of links as input and go through them one by one . Once I have a list of web sites with 302 redirects I can prove or disprove my suspicion. I guess I'll have to bite the bullet and spend time writing a script that'll do this. I was hoping to get some suggestions for doing this in an easier way.
0
Haren MorseAuthor Commented:
I am not at all into web development. So it'll be very time consuming to try Dave Baldwin's suggestion.
0
arnoldCommented:
It is not a question of web development,

A redirect can be set on the web server
I.e. URL based redirect, I.e. If request matches a pattern, the user canberedirected to a different URL, using the 302 or 301
301 is a permanent redirect. The 302 is not.
0
Olaf DoschkeSoftware DeveloperCommented:
Now we're getting a  bit clearer. If you're talking about something like https://www.coretechnologies.com/products/http-ping/ this is just named "ping", but does http requests. The best equivalent you can have about "pinging" a URL is a http HEAD request. It lets the server send all response headers and no response body.Edit: I see two interesting parameters for this tool: 1. -q makes HEAD requests, and -r Follows HTTP redirects. The latter shows this is a thing the client does, not the server.

If you make a HEAD request to a URL with a redirect, all you get back is a header with the new URL, you're not directly redirected to the new URL, the redirection type 301 or 302 won't play a role about that, but tell you whether you should simply forget about the original URL or not.

For example doing a http request via Javascripts XMLHttpRequest towards http://experts-exchange.com you get a response with status 301 and Location:http://www.experts-exchange.com, but you don't get the response body you'd get when you request http://www.experts-exchange.com, this isn't done automatically by the server side. The server side just answers with the new target Location. A tool only making a simple HTTP request is not automatically making the additional request, it just receives the information necessary. A browser, on the other hand, will then make that new request and finally get you there.

Now, if the Citrix client has no problem retrieving the new target URL, but has problems receiving the original URL, the Citrix remote desktop is correct in opening that URL in a browser within the desktop session and not letting a client side browser open up. That would require the Citrix feature to repeat this "ping" test with the new target URL and make that decision where to start the browser once more, then opening it at the client with the target URL.

Edit: When this is the case the original URL opened in a browser within the remote desktop session will redirect to a target URL the client could have opened, too. So you get the impression the mechanism failed. That's what I'm assuming now.

In very short: If a 302 redirect is made because some URLs not visible (or not trusted) for clients are forwarded to make the final target URLs visible to them, the Citrix feature fails to take that into account and you're still directed to a browser within the Citrix desktop session.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Haren MorseAuthor Commented:
Thanks for all the help Olaf
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.