Skip to main content

Posts

Showing posts from September, 2010

Dynamic DocumentRoot for Sub-Domains.

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    ^(.*)$  ...