get use_rewrites/use_secure from config if given - fixes #357
set the secure_base_url
use the right variable
Merge pull request #369 from fooman/use-rewrites-secure

get use_rewrites/use_secure from config