Changed some of the redirects using the redirect function instead of using the header function
Tried using sqlite database.
Revert "Tried using sqlite database."

This reverts commit 734b802e054e41933c585127f31520eb6f79b01d.