HowTo Park a domain on a subdirectory
This is a discussion on HowTo Park a domain on a subdirectory within the HowTo Tutorials for web hosting forums, part of the Virtual Hosting Forums category; First, in CPANEL, park the domain on your account. Next, add this to your .htaccess file in your public_html dir. ...
![]() |
| LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
| 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
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 |
|
#2
| |||
| |||
| This is a great post,it certainly makes a good point with the step by step information. |
|
#3
| ||||
| ||||
| 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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
All times are GMT -8. The time now is 05:20 AM.









Linear Mode
