RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php
$requestedString = explode('?', getenv('REQUEST_URI'));
$requestedString = $requestedString[0];
<VirtualHost 1.2.3.4:56 >
ServerName site.ru
ServerAlias *.site.ru
DocumentRoot /var/www/user/data/www/site.ru/router/
</VirtualHost>