View Single Post
Old 11-17-2007, 05:30 PM   #1 (permalink)
brandnew
Inactive
 
Join Date: 11-17-07
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

brandnew is liked by many
Unhappy Need help with HTACCESS file

I am just a beginner...if even that. I learn by trying things and accomplishing or failing something. But that is not the point. Here is my BIG problem
I own let say maindomain.com and am happy with how things go. However...
I decided to add another domain name (let's say addondomain.net) to my hosting account so that I can have two websites: one would be run from root directory and another would be on one of my subdomains (subdomain.maindomain.com) so that maindomain.com would always take me and my visitors to maindomain.com and addondomain.net would take to subdomain.maindomain.com
This was not a hard task to do. Things turned ugly on me when I decided I wanted my browser to display addondomain.net/whatever.file instead of subdomain.maindomain.com/whatever.file
I've read quite a few posts on the internet about htaccess file and believe me I tried many things without understanding or knowing what I was doing. Nothing happened. Well...almost nothing...other then my addondomain.net site is discolored and picturless and all this is just terrible.
But I believe there is someone who can help me sort thing out. Could you please, check what is wrong with my htaccess files

This is htaccess file in my public-html folder under my main site - maindomain.com:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^addondomain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.addondomain.net$
RewriteRule ^/?(.*)$ http://addondomain.net/$1 [L,R=301]


AND...

This is htaccess file in my joomla folder (subdomain.maindomain.net):

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^subdomain\.maindomain\.com [NC]
RewriteRule ^(.*)$ http://addondomain.net/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(/component/option,com)$ [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php


As for now, I just have my addondomain.net pointing to subdomain.maindomain.net and my browser displays subdomain info, which is not what I would want.
Please, help me figure things our if it can be done.
brandnew is offline   Reply With Quote