PHP redirect returning die() information and not redirecting -


i trying redirect page if original pay not accessible.

the check see if first page avalible works should. achived httprequest.

if page un-contactable redirect code follows:

redirect();  function redirect(){     header('location: http://somewebaddress');     die("should redirect"); } 

for reason redirect not completed. runnning file in command line reviles file returns:

"should redirect" 

any ideas why not redirecting?

use exit; instead of die(); , should work!


Comments