Redirect Questions

I have some questions involving htaccess and CNAMES.

Is is possible to have a virtual subdomain with Dreamhost through htaccess? I think it is possible but my htaccess code is just wrong.

RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.mydomain\.com RewriteCond %{HTTP_HOST} ^sub\.mydomain\.com RewriteRule .* /directory
Is it possible to create a CNAME for example,, that will redirect to Where the is not host by Dreamhost? From what I have read this is possible if I add “old” as a CNAME and point it to

Create [color=#0000CC][/color] in Panel and put a .htaccess file in it:

Redirect 301 /

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost

[quote]RewriteEngine on
RewriteCond %{HTTP_HOST} !^
RewriteCond %{HTTP_HOST} ^
RewriteRule .* /directory[/quote]
This won’t work with just adding a CNAME. DreamHost uses named-based virtual hosting, and thus the server needs to lookup a virtual host entry based on the Host header. You only get those entries by “Adding a New Domain / Sub-domain” in the DreamHost Web Panel, and it doesn’t let you add “ServerAlias” directives to make this work. You can try asking support to add them or wildcard DNS but be prepared to make your case.

:cool: -//-