Use find's -type option to limit actions to files and directories. Use the -o option to specify alternate actions for different types, so you only have to run find once, rather than separately for each type.
find htdocs -type f -exec chmod 664 {} + -o -type d -exec chmod 775 {} +