fixed redirects in php