Is it possible to get around a 301?

by 6 replies
8
Is there anyway of preventing redirection from one site to another?
#programming #301
  • a 301 is just a piece of information passed before any other content is sent, or without sending anything else. There is nothing forcing any user-agent to follow it, browsers and such are just programmed to react a certain way to them. Content scrapers gather information all the time without following redirects.
    • [1] reply
    • sure, so how do I view the original webpage
  • If a webpage redirects you to another address with a 301, best you can do is not going to that new page (with a special method). The redirection is the only thing the server is giving you. I hope you're asking this.
  • The original webpage is consisting of only redirection headers. There isn't anything else you can view.
    • [ 1 ] Thanks
    • [1] reply
    • Actually, this isn't necessarily true. A webpage can send redirection headers and then still send content. If this is the case, your browser will simply ignore everything after the headers are sent, and redirect anyway. There are probably browser plugins you can install that will prevent the redirect from happening, why don't you search for them?

      Usually what bestfriend is saying is the truth, however. If there's a redirect header, there's probably not going to be anymore content. But just because there's a redirect header doesn't mean that output stops. That's not how HTTP works.
  • Yes, actually HTTP works how wayfarer said. And as an addition, if redirection made by a PHP script and it's not stopping execution of itself after the redirect, then it may continue to outputting. This is considered a security flaw for development. But I don't think the OP looking for this.

    There is a plugin named "NoRedirect" for Firefox. After installing it, add the URL you want to not redirect you, and you'll able to see it's content (Something like; "Found The Document has moved here." ).

Next Topics on Trending Feed