Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Ezilon Directory   1,000 Directory Submissions   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2007, 05:30 PM   #1 (permalink)
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  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 12-02-2007, 05:16 PM   #2 (permalink)
edd
Member
 
Join Date: 12-01-07
Location: Ny
Posts: 34
iTrader: 0 / 0%
Latest Blog:
None

edd is a jewel in the roughedd is a jewel in the roughedd is a jewel in the roughedd is a jewel in the roughedd is a jewel in the roughedd is a jewel in the rough
Send a message via AIM to edd Send a message via MSN to edd Send a message via Yahoo to edd
I hate using .htaccess. I try not to use it as much as I can. The simplest way to do it is to have addondomain going to maindomain.com/addondomain/. In the addondomain folder, have a meta refresh set to 0 seconds which goes to wherever the subdomain's contents is. You get away without using .htaccess or worrying about internal server errors.
edd is offline  
Add Post to del.icio.us
Reply With Quote
Old 12-02-2007, 11:13 PM   #3 (permalink)
Inactive
 
Join Date: 11-17-07
Posts: 3
iTrader: 0 / 0%
Latest Blog:
None

brandnew is liked by many
Thanks, edd!
I appreciate your reply. Will try it!!!
brandnew is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



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

vB 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 05: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 03: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! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 06:51 PM.
© Copyright 2008 V7 Inc