Redirect a website from one url to another
-
Is it possible with PFSENSE to redirect as an example bing.com to google.com? If so where do I make the changes?
-
This isn't something pfSense will do on its own but a package like squid might be able to do this.
-
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
-
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.