hello, am using centos + apache. and the website is loaded via ip and domain. I am wanted to disable the website access via ip. how to make this possible? Looking forward for reply. Regards,
Eh, what? That is not possible. Well, technically, you can throw any visitor using the IP into the dumps, of course, instead of showing the site, but what would be the point?
You could disable website access using IP address using .htaccess rules. The following rule would help: RewriteEngine On RewriteCond %{HTTP_HOST} ^123\.123\.123\.123 RewriteRule ^(.*)$ - [F,L] (Please replace 123\.123\.123\.123 with your server IP address).