Thursday, April 22, 2010

Katydids Peanut Candy

Redirect to different URLs depending on the browser used.

Sometimes when you go to the browser in a web page get the expected result, but if you do it with telnet
  • or a
  • spider web sends you to another web differently. This is because the server is configured to allow access to people and no programs to download the complete website.

    Operation is simple. Eg Apache module is used to check
    rewrite the headers sent by the client. If this is a browser and passes it redirects to another site.
    Apache In manual you can see how to use it:
    URL Rewriting Guide - Advanced topics Well if easy to do, it's easier to skip it. If you check the http header User-Agent
    or tell the spider web
    to use another. When using the telnet would have to do the following: 80 > User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB, rv: 1.9.1.9) Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9
    >


    And when using wget:

    wget - header = 'Host: www.google.es '- header =' User-Agent: Mozilla/5.0 (X11, U; Linux i686; en-GB, rv: 1.9.1.9) Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9 'www.google.es


    0 comments:

    Post a Comment