Don't use absolute URL for rest calls (fixes #166)
Don't redirect to absolute URL (fixes #166)