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

Redirect a website from one url to another

Scheduled Pinned Locked Moved General pfSense Questions
4 Posts 4 Posters 2.7k Views
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 Apr 4, 2015, 7:46 PM

    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 Apr 4, 2015, 10:13 PM

      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
      • K
        KOM
        last edited by Apr 7, 2015, 7:27 PM

        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
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by Apr 7, 2015, 8:24 PM

          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 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received