Step 1: Open up a Terminal windows (this is in your Applications/Utilities folder by default)
Step 2: Enter the following command to open the local host file.
+++
sudo vi /etc/hosts
+++
Step 3: Enter the following into that file
ServerIP yourwebsite.com
(Example 127.0.0.1 mywebsite.com)
Step 4: Save as (Esc+:wq).
Step 5: You can now view the website using any browser.