How can a website efficiently redirect users without Flash plugin to a non-Flash version of the site?

When a user visits a website without the Flash plugin installed, they may encounter issues with Flash content on the site. To efficiently redirect these users to a non-Flash version of the site, you can use PHP to detect if the Flash plugin is enabled in the user's browser. If the plugin is not detected, you can then redirect the user to a non-Flash version of the site.

<?php
if (!isset($_SERVER['HTTP_ACCEPT']) || strpos($_SERVER['HTTP_ACCEPT'], 'application/x-shockwave-flash') === false) {
    header('Location: non-flash-version.php');
    exit();
}
?>