Throw error when specified method does not exist

Fixes #247.
I am not sure if the rewrite rule changes are should be included in this pull request.
Please review