I'm implementing an easy website in a hosting company, but encounter some issues. I'm quite new in this region.

My domain "xxx.com" 's default directory is public_html/xxx.com at server. (meaning xxx.com/test.php will access public_html/xxx.com/test.php automatically). But how do i set(config) xxx.com 's default directory for an sub-directory like: public_html/xxx.com/public/www ?

In addition: I've xxx.com, yy.xxx.com, zz.xxx.com, all indicate public_html/xxx.com initially. I would like them:

xxx.com indicates public_html/xxx.com/public/world wide web

yy.xxx.com indicates public_html/xxx.com/public/yy

zz.xxx.com indicates public_html/xxx.com/public/zz

How do i accomplish this? What type of .htacess or other appropriate ways must i use?

Thanks.

This can be done having a .htaccess file inside your /public_html/ folder

RewriteEngine on
RewriteBase /

RewriteCond %{HTTP_HOST} ^xxx\.com$ [NC]
RewriteRule (.*) /public/www/$1 [L,NC]  

RewriteCond %{HTTP_HOST} ^yy\.xxx\.com$ [NC]
RewriteRule (.*) /public/yy/$1 [L,NC]  

RewriteCond %{HTTP_HOST} ^zz\.xxx\.com$ [NC]
RewriteRule (.*) /public/zz/$1 [L,NC]