If you have plenty of sub-domains and every subdomain routes in another directory on the server, This can be done dynamically. Add folling in httpd.conf/httpd-vhost.conf <\VirtualHost *:80\> ServerName www.kishor.com ServerAlias www.kishor.com ServerAlias kishor.com ServerAlias *.kishor.com RewriteEngine on RewriteCond %{HTTP_HOST} ^kishor.com RewriteRule ^(.*)$ /var/www/html/$1 [L] RewriteCond %{HTTP_HOST} ^www.* RewriteRule ^(.*)$ /var/www/html/$1 [L] RewriteCond %{HTTP_HOST} ^(.*)\.kishor\.com RewriteRule ^(.*)$ ...
BLOG for DevOps, SYSTEM ADMNISTRATORS, Linux, Windows, Solaris, AIX, MAC and many more....