Per Jessen schreef:
> Dušan Novaković wrote:
> 
>> Hi,
>>
>> Is there some elegant solution how to redirect if someone try to open
>> some non existing page (e.g www.domain.com/nonexistingpage.php) to
>> main page www.domain.com on website?
>>
> 
> See Apache "ErrorDocument" directive.
>

ai,

ErrorDocument 404       /404.php

<?php // 404.php

// do something with query args?

// or just redirect
header('Location: /'); // there should really be FQDN there, but I never bother.
?>

or just have apache do all of it ... having a php script
handle the 404 allows you to do fun things with requested URI, GET string, etc

> 
> /Per Jessen, Zürich
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to