1

I have run into a problem which is that my web host doesn't appear offer addon domains.

I currently have a domain name pointing to my name servers.

I went into cPanel to add an addon domain that points to a sub-directory, but all that is available in cPanel is to park domain at the document root which is 'public_html/'.

So traffic coming from the parked domain would get the wrong content, which is obviously not good.

I get the feeling that this isn't possible, but can I change the parked domain document root from 'public_html/' to 'public_html/sub-directory' ?

Or perhaps can I edit the .htaccess file to redirect traffic from the parked domain to the sub-directory?

Basically I want this address; www.parked-domain.com/

To show the content of this sub-directory; www.first-domain.com/parked-directory

I hope this is possible otherwise I need to look at a new web host.

Regards,

Dean.

user77996
  • 113
  • 1
  • 3

2 Answers2

2

Try the technique from Pointing parked domain to a sub-directory.

Supposing the Parked domain is parked.com and the folder inside the main site is /parked, use this rules:

RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} parked.com
RewriteCond %{REQUEST_URI} !parked/
RewriteRule ^(.*)$ parked/$1 [L]
brasofilo
  • 111
  • 5
Rutiolma
  • 21
  • 2
  • 1
    Welcome to Server Fault! Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – user9517 Mar 15 '12 at 18:16
0

No, its is not possible.

Parked domains does not have any hosting space. It can only mimic the main domain with different name.

Suku
  • 2,006
  • 13
  • 15