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. ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
#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 |