Do I use both Java with PHP or the only PHP code is sufficient for the redirect. It getting some confusion