RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^coffee.
RewriteRule ^(.*)$ /projects/coffee/www/$1 [L]
RewriteEngine on
RewriteRule ^$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?id=$1 [QSA,L]
<IfModule mod_rewrite.c>
RewriteEngine on
# Subdomains
RewriteCond %{REQUEST_URI} !^/subdomains
RewriteCond %{HTTP_HOST} ^(.*)\.domain\.ru$
RewriteRule ^(.*)$ /subdomains/%1/$1 [L,QSA]
</IfModule>