Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Redirect a website from one url to another

    General pfSense Questions
    4
    4
    2208
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      radiowall last edited by

      Is it possible with PFSENSE to redirect as an example bing.com to google.com? If so where do I make the changes?

      1 Reply Last reply Reply Quote 0
      • A
        antillie last edited by

        This isn't something pfSense will do on its own but a package like squid might be able to do this.

        1 Reply Last reply Reply Quote 0
        • KOM
          KOM last edited by

          You can do it with Squid or the DNS Resolver, I think.  I can't imagine why you wold do this.  Is Microsoft paying you a penny for every user search you redirect from Google???  ;D

          1 Reply Last reply Reply Quote 0
          • johnpoz
            johnpoz LAYER 8 Global Moderator last edited by

            here is where you run into a problem.. The host headers the box sends out would be for the fqdn your trying to access, just redirecting it to an IP would not change that.  You would need something telling the browser hey the resource your looking for has moved, basically a 301 response

            http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

            10.3.2 301 Moved Permanently

            The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. Clients with link editing capabilities ought to automatically re-link references to the Request-URI to one or more of the new references returned by the server, where possible. This response is cacheable unless indicated otherwise.

            The new permanent URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

            If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.

            Note: When automatically redirecting a POST request after
                  receiving a 301 status code, some existing HTTP/1.0 user agents
                  will erroneously change it into a GET request.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 22.05 | Lab VMs CE 2.6, 2.7

            1 Reply Last reply Reply Quote 0
            • First post
              Last post