Question
how to disable direct visiting on website with its server IP address with both http://1.2.3.4 and https://1.2.3.4
We can disable direct visiting on website with its server IP address with below method —>
ServerName 1.2.3.4
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Location />
Order Allow,Deny
Deny from All
</Location>
but it can still visit-able with https://1.2.3.4… .
Can any one please tell how to prevent visits with
http://1.2.3.4 and https://1.2.3.4
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×