RewriteEngine on RewriteCond %{HTTP_HOST} ^baikal.example.com$ [NC,OR] RewriteCond %{REQUEST_URI} !html/ RewriteRule .well-known/carddav /dav.php [R,L] RewriteRule .well-known/caldav /dav.php [R,L] RewriteRule (.*) /html/$1 [L]