move query string handling below referer handling
add configuration file