...

View Full Version : BLAH.yourname.com



relyt
02-22-2003, 02:32 AM
I have noticed a few sites, eg boards.uo.com, use something else instead of WWW.yourname.com/longthingthatnoonewantstotype
how would i do this?

mouse
02-22-2003, 03:47 AM
It's refered to as a subdomain. You may or may not be permitted subdomains by your host. Really all it is is a folder in the publicly accessible directory, that's all "www" is too really.

relyt
02-22-2003, 04:43 AM
well, ok, there is /var/www/html/ where would i create the dir so it would be whatever.warpcell.com?

meow
02-22-2003, 05:26 AM
Most often it doesn't matter where the folder is. IF you are allowed to create subdomains you do it in your CP (or your host does it for you) and then the subdomain is mapped to the directory you specify. Just as your domain is mapped to a directory on the server.

Nightfire
02-22-2003, 08:24 PM
There is a way to do it with htaccess, if you can use that

relyt
02-22-2003, 09:20 PM
yeah i do have htaccess

relyt
02-26-2003, 01:55 AM
so can anyone help me?

krycek
02-26-2003, 02:08 AM
You will need mod_rewrite installed in your apache build first. You also need to figure out whether you need to enable wildcard DNS - you may not have the permissions to do that. If you can, the wildcard (*) will go in there something like this:


$ORIGIN mydomain.com.
* A 123.12.123.123
ftp A 123.12.123.123
mail A 123.12.123.123
www A 123.12.123.123

If you are using virtual sites you may have to add that to the site's own definition file, also if you are using virtual sites edit your /etc/httpd/conf/virtual/siteX to add:


ServerAlias *.domain.com

Otherwise stick it in /etc/httpd/conf/httpd.conf

Now in your .htaccess file:


RewriteEngine On

Options +FollowSymlinks
RewriteBase /

RewriteCond %{HTTP_HOST} test.domain.com
RewriteCond %{REQUEST_URI} !test/
RewriteRule ^(.*)$ test/$1 [L]

As far as I know that should work however it is straight ogg the top of my head and I haven't got time or inclination to test it right now. It should work with Apache 1.3.x and 2.0.x as well.

In addition you may have to edit (or create) your apache.py file but I hope not.

Good luck! :thumbsup:

::] krycek [::



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum