2

I have the site domain.com and creates the need subdomain.domain.com that points to the directory domain.com/public_html/subdomain

How do I do that?

The subdomain folder must be within the public_html folder domain.com

The vestaCP possesses the possilidade to choose the root folder of the subdomain?

Sorry for my bad English.

Simply put:

I need it:

sub.domain.com> /home/user/web/domain.com/public_html/subdomain

No:

sub.domain.com> /home/user/web/sub.domain.com/public_html
mnille
  • 1,328
  • 4
  • 16
  • 20
Magento Team
  • 123
  • 6

1 Answers1

-1

I always solve it by one of this 2 ways (each of them has advantages and disadvantages):

  1. I redirect the subdomain by .htaccess file to the folder inder the main domain. So i just add Redirect 301 / http://example.com/subfolder to the .htaccess file of subdomain. It's classic unmasked redirection.
  2. I make a PHP file index.php in /home/user/web/sub.domain.com/public_html folder with this content: <?php print file_get_contents("https://example.com/subdomain/"); ?> and in folder /home/user/web/example.com/public_html/subdomain is website. Phe PHP file displays the whole content of website on main domain folder.

None of them is the real solution, it's just a how to hack it, but I hope it will be useful