The problem here is likely to be with the paths in the exclude
filters in rsync.
The paths used in the rsync file list are relative to the SOURCE path.
That is if your directory structure is
/home/path/to/copy
| files_to_copy
| file1
\ file2
\ files_to_exclude
| file3
\ file4
Then if you issue the command
rsync -avr -e ssh user@host:/home/path/to/copy \
/home/user/www --exclude='files_to_exclude/*'
You will get the following structure in the copy
/home/user/www
| files_to_copy
| file1
\ file2
\ files_to_exclude
If you do not want to have the directory files_to_exclude
in the copy you may use the following command:
rsync -avr -e ssh user@host:/home/path/to/copy \
/home/user/www --exclude='files_to_exclude'