fix php errors on redirect snippet Closes #5