URL Redirection to a sub domain


#1

Hi,

i’m trying to redirect my forums url to the sub domain i created. for example: if the users access www.test.com/forums/ then it should automatically redirect them to http://forums.test.com

Can this be done within the dreamhost control panel or do i have to create a script that could process this?


#2

You should be able to do it in your .htaccess with mod_rewrite or maybe use remap sub-dir from the DH control panel.

try something like:

RewriteRule ^forum /path/to/subdomain/directory


#3

You need to create a “.htaccess” file in your root www directory. It needs only one line:

Redirect /forums http://forums.test.com

You can create this .htaccess file using Windows Notepad, just specify the file name WITH QUOTES in the filename field: “.htaccess” and then you can upload it to your site using your favorite FTP program.

You can also create the file directly on the server if you log in with SSH, but I think Notepad+FTP is easier for you?


TorbenGB
Try out DreamHost with a free WebID /// Compare plans


#4

Great… thanks a lot.