navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Assigning different domains to different directories

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Server Issues >> Assigning different domains to different directories
Page: [1]
 
mshuq68

 

Posts: 5
Joined: 11/19/2005
Status: offline

 
Assigning different domains to different directories - 11/19/2005 1:02:06   
Hi everyone! I'm new here and this is my 1st posting.

I have 3 domain name for 3 different websites. The problem is I can't assign the domain names to their respective subdirectories in my server.

I tried domain forwarding it works fine. However I understand that SEs, directories and some other sites don't like it.

Can someone give some advice?

Thanks
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Assigning different domains to different directories - 11/19/2005 3:46:57   
What software do you use for your control panel?

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to mshuq68)
mshuq68

 

Posts: 5
Joined: 11/19/2005
Status: offline

 
RE: Assigning different domains to different directories - 11/19/2005 5:19:47   
I use cpanel x. Here's the sitution:

I have domain cool.com wth files in the public_html

Then i bought second domain internet.com that i want to point to public_html/internet directory.

My .htaccess file in public_html and look like this...

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URl} -d
RewriteRule ^/*(internet/)?(.*[^/])$ http://%{HTTP_HOST}/$2/ [R=301,L]
RewriteCond %{HTTP_HOST} internet.com
RewriteCond %{REQUEST_URl} !internet/
RewriteRule ^(.*)$ internet/$1 [L]


I encountered an 404 error.

Thanks

(in reply to BobbyDouglas)
mshuq68

 

Posts: 5
Joined: 11/19/2005
Status: offline

 
RE: Assigning different domains to different directories - 11/19/2005 6:03:58   
Ok it works! Apprently the word "URl" should be read as "URI".

Anyway, if I want to add a 3rd domain called home.com should I write it like this...
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d
RewriteRule ^/*(internet/|home/)?(.*[^/])$ http://%{HTTP_HOST}/$2/ [R=301,L]

RewriteCond %{HTTP_HOST} internet.com
RewriteCond %{REQUEST_URI} !internet/
RewriteRule ^(.*)$ internet/$1 [L]

RewriteCond %{HTTP_HOST} home.com
RewriteCond %{REQUEST_URI} !home/
RewriteRule ^(.*)$ home/$1 [L]

(in reply to mshuq68)
BobbyDouglas

 

Posts: 5470
Joined: 5/15/2003
From: Arizona
Status: offline

 
RE: Assigning different domains to different directories - 11/19/2005 13:16:50   
You don't even need that. Take a look at addon domains.

_____________________________

Arizona Web Design - Mr Bobs Web Design in Arizona
The Arizona Web Hosting Challenge

(in reply to mshuq68)
mshuq68

 

Posts: 5
Joined: 11/19/2005
Status: offline

 
RE: Assigning different domains to different directories - 11/19/2005 13:23:28   
I'm aware of that. Unfortunately, my hosting package don't allow addon domain :(

(in reply to BobbyDouglas)
Page:   [1]

All Forums >> Web Development >> Server Issues >> Assigning different domains to different directories
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts