Php on UO Shell the bare minimum

I wanted to redirect a shell site to a new WPMU site on the UO’s Web Site Lite setup. http://sites.uoregon.edu/. Web Site Lite is great, but it has limitations. Since I wanted to redirect all the old links to the new site I set up a .htaccess file that bounces all requests from the old site to the new site.
To do just that I could use:

Redirect 301 /~oa/ http://oa.uoregon.edu/ #works but I'd like to remove .php and .html

But I wanted to remove the file extensions before redirecting.
For that I needed to use Mod Rewrite. Which means I needed to enable php on shell.
There used to be a post: Easy PHP on shell by Tristan but that page is down so I looked at my other domain on shell and it turns out, all I needed to do is put a php.cgi file in the public_html folder and add some lines to the top of my .htaccess file. Now the mod_rewrite script can run! (more…)