this script will automatically(on the fly) translate/resolve subdomian into dedicated folder path.
without touching web server config(
eg:
main domain name:
http://mysite.com
main vhost doc root:
/usr/local/www
Folder inside:
/usr/local/www/brother
/usr/local/www/sister
/usr/local/www/mother
/usr/local/www/father
/usr/local/www/inlaw
/usr/local/www/cucu
/usr/local/www/cicit
/usr/local/www/oneng2
........
so
when browser open url:
http://mysite.com/
it will display:
But when browser open url:
http://brother.mysite.com/
it will display:
content inside folder 'brother', and can view everything inside this folder.
The Script:
#!/usr/bin/perl ######################################## use CGI::Carp qw(fatalsToBrowser set_message); BEGIN {sub handle_errors { my $msg = shift; print qq|Server Error Web Server Error!
$msgPlease inform the mbek about this error.