i've got apache, php and mysql installed locally on a windows xp machine. in one of my php pages, i've got the following line of code: header("Location: http://localhost/index.html"); exit(); Code (markup): there is absolutely no output to browser before this code. however, the redirect still doesn't happen. any ideas?
Have you tried changing the URL to something different to see if that works? eg header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.google.co.uk"); exit(); PHP:
Thanks for all the help. My bad, I missed out on a "print" command earlier in the script. The redirect is working now. ** reminding myself to get a new pair of glasses **