PDA

View Full Version : Preventing user from using the server IP to access their website


max2000
09-06-2006, 06:53 AM
Hello,

I would like to provent users from accessing their website using the server IP:

http://1.2.3.4/~username

I would like to stop this.

Many people profit from this possibility to link to illegal material or pishing pages without having to buy a domain name somewhere.

Thank you for your hints.

hehachris
09-07-2006, 12:20 AM
in your httpd.conf

there should be 2 lines in the virtual hosts near the end:

AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2

comment it, or modify to whatever your want

remember to restart Apache after the change

max2000
09-08-2006, 06:10 PM
Thank you, it worked!

Your scripts are really cool!