Added conditional to ignore non-main query queries and the admin panel.

redirect() was running on every query: menus, custom queries, the admin panel, etc.
Merge pull request #1 from ofdesks/master

Just a simple fix.