localhost port mapped to website
This is quite easy if there's no back story to why you feel hosts file is not the right solution. You also might have problems if you're not used to pasting things in Terminal, but if that's the case - you can ask a second question for help on that too!

Copy and paste the following lines into Terminal:

cd
mkdir diy_proxy
cd diy_proxy
cat &gt; index.html &lt;&lt; EOF
&lt;meta http-equiv="refresh" content="0; url=http://apple.stackexchange.com/" /&gt;
EOF
python -m SimpleHTTPServer


To kill the python web server, press: Control-C

The lines do the follows:


get you in your home directory/folder
make a folder to hold the index file that will redirect your browser
go to that folder
send characters to the file index.html until you see EOF (and don't include it)
This is the magic that tells your browser to redirect
ends the content to save to file index.html
start a lightweight web server on port 8000 to serve up the index file