http - What happens if a 302 URI can't be found? -


if make http request index.html on http://www.example.com url has 302 re-direct in place points http://www.foo.com/index.html, happens if redirect target (http://www.foo.com/index.html) isn't available? user agent try original url (http://www.example.com/index.html) or return error?

background question: manage legacy site supports few existing customers doesn't allow new signs ups. pretty pages redirected (using 302s rather 301s unknown reason...) newer site. includes sign page. on 1 of pages isn't redirected there still link sign page links through third party payment page (i.e. on domain). last week our current site went down couple of hours , in period signed through old site. way can imagine happened if 302 doesn't find intended url (all?) user agents bypass redirect , go requested url.

by way, i'm aware there many better ways handle particular situation we're in 2 sites. we're on it! 1 of weird situations want bottom of.

you should receive 404 not found status code.

since http stateless protocol, there no real connection between 2 requests of user agent. redirection status codes way servers politely tell clients resource looking somewhere else now. clients, however, in no way obliged request resource other url.

oh, signup page @ that url now? don't want anymore... i'll go , @ kittens instead.

moreover, if client decides request new url (which ^^), can considered new communication between server , client. neither server nor client should remember there previous request resulted in redirection status code. instead, current request should treated if first (and only) request. , happens when request url cannot found? 404 not found status code.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -