anything.deleted.com should automatically forward to the root of
www.deleted.com if you add the following to your apache httpd.conf (assuming you're using apache..). Under the <VirtualHost> tag for deleted.com, set your ServerAlias like this:
ServerAlias *.deleted.com deleted.com
You can do fancy .htaccess forwarding something like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^.*/somefolderthatalreadyexists/
RewriteCond %{REQUEST_URI} !^.*/anotherfolderthatalreadyexists/
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ index.php?P=$1&link1=$2&link2=$3&link3=$4 [L]
That should forward
http://pants.deleted.com to
http://www.deleted.com/pants
Depending on your site, you'll need to mess around a bit with that...
The RewriteCond lines should contain any existing folders that you don't want forwarding to work for. For example, you don't want
http://cgi-bin.deleted.com to forward to
http://www.deleted.com/cgi-bin
Also, just for fun, did you know that you can use underscores in third-level domains? So
http://no_pants.deleted.com will work..
Mr. Deleted said:
PHP:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.deleted.com
AuthUserFile /home/deleted/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/deleted/public_html/_vti_pvt/service.grp
I just set up wild card dns on deleted.com and am wondering what to put into htaccess to make anything.deleted.com forword to deleted.com, or whereever I want it?