When using rsync, specifying a directory with a trailing slash, like: /var/www/somedir/ -- will not take into account the directory itself, only the contents. If you omit the trailing slash: /var/www/somedir it will upload the directory and its contents.