Forum Moderators: phranque

Message Too Old, No Replies

Please help with redirect command syntax

Need to redirect to subdomain

         

cj_rhoads

12:25 am on Nov 27, 2007 (gmt 0)

10+ Year Member



Hi.

I'm hoping that jdMorgan or someone else can help me. I've been searching for this answer for months, but there seems to be very few people who even know what .htaccess is, much less how to write the commands for it. I had thought what I needed to do would be relatively easy, but I haven't found a single example that works, and my poor brain isn't intelligent enough to figure out how to modify the examples to make them do what I want done. Truthfully, I'm not even sure if I should be using a "rewrite" command or a "redirect" command. This is the first place that I've found where people seem to understand .htaccess.

What I would like to do is to redirect incoming domains to the appropriate subdirectory. For example, someone entering

[firstdomain.org...]

would be redirected to

[firstdomain.org...]

and someone entering

[seconddomain.org...]

would be redirected to
[seconddomain.org...]

This is to accomodate the two different Joomla instances that I've installed. I know that it would be easier to just have two different hosting sites, but this is for a non-profit organization and they can only afford one hosting account, but want to manage 2 domains on it. All the websites are aliased already to the main site so [firstdomain.org...] and [seconddomain.org...]
and [thirddomain.org...] (as well as six others) all go to [firstdomain.org...]

Can anyone take pity on me and help me figure out what I should put into the .htaccess file? Also - should it only be on the root level, or do I need to put .htaccess in each subdirectory?

Thanks you in advance for any help that you can give me. Hundreds of people will be extremely grateful.

[edited by: jdMorgan at 12:54 am (utc) on Nov. 27, 2007]
[edit reason] No URLs, please. See TOS. [/edit]

jdMorgan

12:58 am on Nov 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This search [google.com] should help you get started. The code can usually go in your root .htaccess file, although using "Add-on domains" under cPanel can complicate things.

Jim