Fix for nginx users

Changing rtrim to trim allows use by the rapidly growing userbase of the very popular nginx webserver, while not affecting apache users.
Same fix as applied to php-mvc.
Thanks for this great project!