Allow URL to specify database and redirect to correct database after an edit