How do I block all IP's from visiting my site except one?
I have a website that was setup specifically for PHP/MySQL development so I can show clients their projects as I progress. I would like to block anyone from viewing this site unless I have allowed their IP to view it.
On my local system I can configure Apache to do it in the config file but I am on shared hosting so I don't have access to the config file. Thanks for your help.
Okay, I already had a .htaccess file in my directory (it was empty), so I added:
order deny, allow
deny from all
allow from [IP here]
Now when I go to the website I get:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Any advice? Thanks!
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.