Redirecting to index.php from index.html

From: Date: Tue, 17 Jun 2003 18:41:34 +0000
Subject: Redirecting to index.php from index.html
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-151885@lists.php.net to get a copy of this message
I'm a relative newbie to PHP coming from the Zope/Python/DTML world. Does anyone know of a good way, short of a javascript, to redirect from index.html to index.php. Also, can I use PHP to test for browsers, then redirect them to the appropriate page. In DTML/Python it would be : <dtml-if "_.string.find(HTTP_USER_AGENT, 'Mozilla/4') >= 0> <dtml-call "RESPONSE.redirect('moz4_page.php')"> </dtml-if> This can be called from anywhere in the page. I know that PHP does not work this way and that this would need to be done before <html>, but I'm even having problems with that. I guess I'm just having a hard time THINKING like php.

« previous php.general (#151885) next »