Web Hosting Forums  

Go Back   Web Hosting Forums > Virtual Hosting Forums > HowTo Tutorials for web hosting
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-31-2007, 11:02 AM
michael_s's Avatar
AABox Staff
 
Join Date: Dec 2003
Posts: 91
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default HowTo Park a domain on a subdirectory

First, in CPANEL, park the domain on your account.

Next, add this to your .htaccess file in your public_html dir. Remeber to replace www.domain. with your actual domains.

Code:
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 name of the actual 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, or use FTP to download and edit the .htaccess file.
__________________
Michael Sasek
AABox Staff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 10-02-2007, 04:31 AM
Junior Member
 
Join Date: Sep 2007
Posts: 1
Rep Power: 0
Golden Angel is on a distinguished road
Thumbs up Re: HowTo Park a domain on a subdirectory

This is a great post,it certainly makes a good point with the step by step information.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 10-28-2007, 03:18 PM
michael_s's Avatar
AABox Staff
 
Join Date: Dec 2003
Posts: 91
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default Re: HowTo Park a domain on a subdirectory

It is a regular expression and it is not a wildcard in this instance. In RegEx speak, a * means "Preceeding item must match zero or more times."
__________________
Michael Sasek
AABox Staff
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes



All times are GMT -8. The time now is 07:00 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
Copyright ©2002-2008 AABox Web Hosting