~
Advanced Hosters -

blacks2
: 15.08.2009
: 1
# : 15, 2009 3:15 pm
!

3 4 Sad :


:
site.spb.ru
.
www www.


:
site.spb.ru
htaccess

:
RewriteEngine On
RewriteBase /

#
   RewriteCond %{HTTP_HOST} (www\.)?sub1\.site.\spb\.ru$
   RewriteCond %{REQUEST_URI} !^(/)? sub1/
   RewriteRule ^(.*)$ sub1/$1

   RewriteCond %{HTTP_HOST} (www\.)? sub2\. site.\spb\.ru$
   RewriteCond %{REQUEST_URI} !^(/)? sub2/
   RewriteRule ^(.*)$ sub2/$1

#
   RewriteCond %{HTTP_COOKIE} setting=([^;]+) [NC]
   RewriteRule ^(.*)$ http://%1.site.spb.ru/ [R=302,QSA,L]




1.
sub1.site.spb.ru sub2.site.spb.ru

2. sub1.site.spb.ru sub2.site.spb.ru
.



:
:

Firefox , , .
cookies.




, PHP , JavaScript ,
- META , htaccess, html !



- :


, site.spb.ru, /sub1
cookie,
sub1.site.spb.ru, cookie

,
, . ,
.


= - Sad
:
RewriteCond %{HTTP_REFERER} ^http://(www\.)?en\.site\.spb\.ru/index.html$ [NC,OR]





, !
zip .

!
    ~