Forbid opening website through IP
Hi all,
I am interested how can I make that visitors CAN open my website only using hostname, but if they use IP directly they connection get refused? For example, if I try to open website www.flip.lv everything is ok, but through it's IP address (37.59.9.81) I got connection refused or some other error (screen below). http://i47.tinypic.com/1262oo5.png |
As you don't give us any clues as to what you're using I'll assume apache as your web server.
Configure apache so that the default server for the IP has no content. http://httpd.apache.org/docs/2.2/vhosts/examples.html and look at Using _default_ vhosts |
I don't know if it is made by web server or firewall or something else therefore I am asking this question.
Yes, I am using Apache2. Tried to set apache to redirect to 204 error (no content), but I still need to set destination url. I want that when using IP address directly error is shown as there would not be even webserver running as on screen I attached. |
BUMP
|
Hi,
Quote:
Code:
RewriteEngine on Quote:
Cheers |
All times are GMT -5. The time now is 05:17 AM. |