Go to your project folder and create a file called .htaccess and open it in your editor. If you already have a .htaccess file open it up in your editor.
In the file paste in the following below at the top of the .htaccess
Order deny,allowDeny from all
Now we need to get the IP address for the user. If this is not known you can ask the user IT department to provide this alternatively it can be done by doing Google Search “what my ip” and Google will provide the public IP address.
Now under Deny from all add in the following:
Allow from MY-IP
The site should now only be viewable with user’s added to the htaccess file. To add multiple Ip Address just add each one to a new line. This isn’t my prefered method of letting a user preview a site but it’s a good alternative to use.