Re: - customize .htaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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" <paolo@xxxxxxxxxxxxxxxxx>写道:
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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux