translate php redirect to HTML/JS for gh-pages