Manually Create PHP Page For A Redirect

I guess you are talking about a specific page, for example domain.com/page?
So you can create a generic page template (and select it for the page in WordPress admin panel) or create a template for the specific page. See instructions here.

In this template you can add your php code for the redirect.

If this redirection would be done for the whole site, not just one page, you can always edit the generic page template or the header.php file.