you can try to make use of virtualhost , each domain has its solely directory and make than dir as its root DIR .
Cain 2014-6-17 上午5:14于 "Paolo De Michele" <[email protected]>写道: > hi guys, > > I would like to customize .htaccess > my scenario should be: > > - domain.com > - sub.domain.com > - sub2.domain.com > > for istances, my root directory is /var/www/domain/ > into this would to insert about 2 new directories, called sub and sub2 > > when a guest will digit sub.domain.com or sub2.domain.com will want > reindirize to correctly subdir (sub or sub2) > > this is my .htaccess: > > RewriteEngine on > RewriteCond %{HTTP_HOST} ^sub\.domain\.com$ [NC] > RewriteCond %{REQUEST_URI} !^/webdav/ > RewriteCond %{REQUEST_URI} !^/sub/ > RewriteRule ^/(.*)$ /sub/$1 [R=301,L] > > > when I try to see sub.domain.com the link return to sub.domain.com/sub/ > it works correctly but I would like to see only sub.domain.com/ without > sub directory > > how can I personalize it in the .htaccess? > thanks in advance > > regards > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
