add qurey url 

add qurey url (to create log file) and deal with cgi