uses redirect function to handle changing location
fixed bug causing short url to be wrong length because the code had a forward slash at the beginning and c