We have need for creative htaccess file:
when user enters file that exists – ok.
— i.e http://mydomain.com/install/program32.zip =
/install/program32.zip
when user enters the domain only – redirect download file
— i.e http://mydomain.com = /myfile.apk
when user enters a directory (folder) that doesn’t exist – redirect to specific PHP file.
— i.e http://mydomain.com/custom1 = /manager.php?param=custom1 or
/manager.php?custom1
We currently have 1 & 2 working. Now we are trying to add #3. Currently the htaccess is as follows:
RewriteEngine On
RewriteRule ^$ /myfile.apk [L]
This should do the trick: