Alias /nextcloud "/var/www/nextcloud/" Require all granted AllowOverride All Options FollowSymlinks MultiViews Dav off RewriteEngine on # LogLevel alert rewrite:trace3 RewriteRule ^\.well-known/carddav \ /nextcloud/remote.php/dav [R=301,L] RewriteRule ^\.well-known/caldav \ /nextcloud/remote.php/dav [R=301,L] RewriteRule ^\.well-known/webfinger \ /nextcloud/index.php/.well-known/webfinger [R=301,L] RewriteRule ^\.well-known/nodeinfo \ /nextcloud/index.php/.well-known/nodeinfo [R=301,L] Header always set \ Strict-Transport-Security "max-age=15552000; includeSubDomains"