I work on a mac, both at home and at work. When I work on my site chwisgi.com I work locally on a local webserver (MAMP). This is great as I can work on the site without the need to access the net, I can work off-line you could say. When done something I upload all may changes to the the net (production server). I use Coda which works nicely for my coding needs. To check that everything works I mostly see that it works in FireFox and Safari on Mac. When I want to check how the site behave in Windows and Explorer I have Parallels where I have installed Windows. The problem I had with Parallels was that I could not access the local webserver (MAMP) that I used on the Mac. So if I wanted to see how the site looked in Windows I had to publish my changes to the production server and then check it in Explorer. That is not good.
Let’s see if we can fix this! First some information about my network. The Mac is on the 192.168.1.x network range and the IP is 192.168.1.143. The Virtual Windows is on the 10.211.55.x network range which is default when installing Windows in Parallels. The local webserver (MAMP) is running on localhost and port 8888.
When I say that I cannot access the local web server it’s not really correct. It worked if I hit http://192.168.1.143:8888 in Explorer on Windows and look at static HTML pages. But when I have a more dynamic site it didn’t work. The thing is that my dynamic site uses the ‘localhost’ as the DNS name, so when I hit http://192.168.1.143:8888 it was directed to localhost:8888 which isn’t the correct place in Windows (but is on the Mac).
I tried to use the HOST file on Windows to map the 192.168.1.143:8888 to localhost:8888 but this didnt’t work. I tried to create an alias on my Mac in MAMP, this didn’t work for me either. I searched on the net and finally found a solution.
The solution is to setup a Port Redirection in Windows, this sound kind of geeky and probably is.
1. First download the Windows version of the modified version of Rinetd
2. Take the two files and put them in a folder like ‘rinetd’ and put the folder in the root of C:
3. Open up the rinetd.conf file and change the IP numbers to 127.0.0.1 8888 192.168.1.143 8888
The first number is the local IP number on the mac where you have your have your site running. This should not be changed.
The second is the port. If you are running the MAMP the default port is 8888, change if you have something else.
The third is the IP number of the mac. Open up your Network tools on mac note the IP number, for me it’s 192.168.1.143.
The fourth is the port number on the mac, just use the same as the first port number.
4. Now we just need to start the Rinetd server. What I did was to start a dos window by Start > Run > cmd
5. Drag the rinetd.exe file into the dos window and add -c for custom path to the conf file.
6. Drag the rinetd.conf to the dos window, you should now have something like:
C:\rinetd\rinetd.exe -c C:\rinetd\rinetd.conf
7. Hit enter, if it works the cursor just blinks, no success message here. Just leave the dos window open as long as your are testing.
8. Start Internet Explorer and hit http://localhost:8888 and your site on the mac will should be shown.
Here is a shot of Firefox in Mac, IE, FireFox and Chrome in Windows side by side.

Mission accomplished!