How can PHP be used to check if a requested file exists on a server and redirect to another address if it doesn't?

To check if a requested file exists on a server and redirect to another address if it doesn't, you can use the `file_exists()` function in PHP to check if the file exists. If the file does not exist, you can use the `header()` function to redirect the user to another address.

<?php
$file = 'path/to/file.txt';

if (file_exists($file)) {
    // File exists, do something
} else {
    header('Location: http://www.example.com/redirected_page.html');
    exit;
}
?>