my goal is to have my PHP script executed when a link pointing to a file or directory inside /download
is called (e.g. when trying to call https://example.com/download/files/file.zip
it should launch my index.php
). My .htaccess
inside the /files
folder looks like this:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^.*\.(css)$ [NC]
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]
I tested locally with XAMPP, however, everything is working just fine there. When testing live I found out, that my script is not even executed.
Here are the differences to my local System:
- Live is running on Debian 8.9.0, I am on Windows 10
- I cannot easily access the httpd.conf (apache2.conf) on the live server
- There are two more .htaccess files on the live System one level down and in root
My first guess was, that there are conflicts with the other .htaccess
files in the /download
and root directory. However deleting those did not change anything. My script is still not executed.
I have no idea what I am doing wrong. Can someone point me in the right direction please?