Is there a way to make an SSI (shtml) execute a PHP or ASP script?

Sort of a backdoor method of creating a 301 redirect when you're stuck with the HTML file being linked/indexed, and the normal htaccess method is impossible. SSI runs on HTML and HTM extensions on this server.

The PHP or ASP would ideally pass through the SSI, which in turn would pass to the search engines, thus avoiding loss of PageRank.

Worth a shot. Any help?