#1 (permalink)  
Old 10-17-2003, 04:17 PM
Registered User
 
Join Date: Oct 2003
Posts: 1
1webguru
Domain Directing

I have 2 domain, a and b. Domain A points to /directory1/ and works fine. I want to add a second domina (domian b) and point it to a subdirectory of Domain A.. such as /directory1/sub1/ . I knkow how to do this in WebMin, by editingthe Apache httpd file. How do I do it in Cpanel?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-30-2003, 03:21 PM
Registered User
 
Join Date: Sep 2003
Posts: 389
mickeymouse
RE: Domain Directing

Dear 1webguru,

For redirecting a domain to a subfolder the normal procedure is editing the .htaccess file.

Add the following to the .htaccess file:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.*
RewriteCond %{REQUEST_URI} !/subdir/
RewriteRule ^(.*)$ /subdir/$1
RewriteCond %{HTTP_HOST} ^domain.*
RewriteCond %{REQUEST_URI} !/subdir/
RewriteRule ^(.*)$ /subdir/$1

Replace www.domain.* (4th line) and domain.* (7th line) with the actual domain name of the pointer (minus the \'www.\' in the second instance). Do not put .com or .co.uk on it; keep the asterisk. Also replace the four instances of \"subdir\" with the subdirectory on YOUR site that domain pointer will map to.

This will redirect requests for the domain pointer (both domain.com and www.domain.com) to the directory specified.

You can edit the .htaccess file at cpanel-> filemanager option in cpanel.

Regards,
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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



All times are GMT -5. The time now is 09:05 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc