Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-17-2007, 05:30 PM   #1 (permalink)
Junior Member
 
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  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess blocking ONE file and Redirecting it? homebrewpcgaming Coding Forum 2 07-11-2008 06:53 PM
Need help with .htaccess file (www. redirection) projectwealth Domain Name Forum 4 01-09-2008 06:32 AM
Some help with .htaccess file and 301 Redirects Pairodime Coding Forum 7 04-12-2007 04:04 PM
.htaccess file handling eloquent Coding Forum 6 02-01-2007 02:07 AM
Disable execution by a htaccess file! megamoose Coding Forum 12 11-24-2006 04:47 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 12:36 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.