Use path instead of pathname to get query strings..