retep
09-01-2004, 07:01 AM
Hi. Someone who just ordered and is setting up their VPS emailled us the following tip. It may be of interest to people setting up their VPS with multiple virtual hosts.
While I was moving my files to
the my new server, I was thinking about an easy way to create
subdomains. I thought it might be helpful if you put it in the howto
section for newbies.
After setting up DNS zone verry easily in the CP, we can create a
CNAME for every subdomain and add the name in a .htaccess file in our
apache root:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} folder.example.com
RewriteCond %{REQUEST_URI} !folder/
RewriteRule ^(.*)$ folder/$1 [L]
Last three lines can be reapited for every subdomain.
I know this mail sounds silly but it might help some noobs ;-)
While I was moving my files to
the my new server, I was thinking about an easy way to create
subdomains. I thought it might be helpful if you put it in the howto
section for newbies.
After setting up DNS zone verry easily in the CP, we can create a
CNAME for every subdomain and add the name in a .htaccess file in our
apache root:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} folder.example.com
RewriteCond %{REQUEST_URI} !folder/
RewriteRule ^(.*)$ folder/$1 [L]
Last three lines can be reapited for every subdomain.
I know this mail sounds silly but it might help some noobs ;-)