 <p>After much work, thanks to cainmi's suggestion I have come up with a solution. My .htaccess for the protected directory looks like this</p> <pre><code>RewriteEngine On RewriteBase /php-wrapper/auth RewriteRule ^(.*) /php-wrapper/wrapper.php?topage=https://%{SERVER_NAME}/php-wrapper/auth/$1 </code></pre> <p>This passes the requests back to my php script which checks for Auth and if it passes does the following</p> <pre><code>$type = (get_object_vars(apache_lookup_uri("$abs_path"))); header('Content-type: '.$type['content_type']); readfile($abs_path); </code></pre> <p>Responding with the file and the proper MIME type</p> <p>Because some of the content I was serving had XML I had to disable short open tags. I achieved this by adding this line to the .htaccess of the directory that held the wrapper.</p> <pre><code>php_value short_open_tag 0 </code></pre> <p>Stackoverflow was integral to finding this solution and for that I thank you all.</p>