How to restrict users to go to my site only by using the domain name not by the IP address.
example.
WWW.fun.com - allow
http://172.20.145.78 - don allow.
Please help
How to restrict users to go to my site only by using the domain name not by the IP address.
example.
WWW.fun.com - allow
http://172.20.145.78 - don allow.
Please help
NameVirtualHost *:80
<VirtualHost _default_:80>
ServerName ip.add.re.ss
DocumentRoot /path/to/somewhere/else
<Directory /path/to/somewhere/else>
Order deny,allow
Deny from all
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName www.fun.com
ServerAlias fun.com *.fun.com
DocumentRoot /path/to/your/webroot
</VirtualHost>
That should do it.