Alias /somedir/download "/path/to/your/script/dir" ForceType application/octet-stream Options -ExecCGI DirectoryIndex None # With this configuration, this URL: # http://domain.com/somedir/somescript.php # Can be downloaded as: # http://domain.com/somedir/download/somescript.php # # Note that this causes the source PHP to be downloaded; # NOT the output. If you need that, do it from PHP.