So basically I need a way to take an exe file on my server and make a php function to toggle it’s availability. I do not want to just rename, move, or delete the file, but redirect to a page explaining the file is temporarily unavailable.
I know how to set a permanent redirect in .htaccess but this doesn’t solve my problem since I’d like to make this automated via a php script….
Any suggestions? Thanks in advance.
You won’t be able to do this with PHP alone unless your web server is set up to process requests for
.exefiles as.php, or you add a rule in .htaccess. If the file exists, and .htaccess/server settings allow direct access to files, there’s nothing PHP can do to stop access to it.