Redirect Domain Name to Localhost

Posted by somebody on Super User See other posts from Super User or by somebody
Published on 2010-06-01T15:34:06Z Indexed on 2010/06/01 15:34 UTC
Read the original article Hit count: 172

Filed under:
|
|

I have a linux test machine which I would like to run a copy of a production webserver. This is a legacy application which does not use a property file for its server name. Throughout the application, the server name is hardcoded (example: open connection to myServer.myCompany.com).

Is there any linux trick which I can use to redirect all requests for a certain host back to localhost? I know in Windows that I can add an entry to the hosts file and have it redirect back to localhost. How do I do this in linux?

© Super User or respective owner

Related posts about linux

Related posts about localhost