There is a main.css file, which is available through a direct link http://test4.dev.3klika.ru/main.css
The .htacccess contains the lines:
RewriteEngine on RewriteRule \.(css|)$ - [NC,F,L] but the file is available both when connected in <head> , and by direct link.
I need to redirect all requests for .css files to a .php file that will compress the styles and save the file to the cache, so the option "delete file" is not suitable.
Redroid, thanks for the reply.
The problem is that having an entry in .htaccess:
RewriteRule ^css/(.*).css$ /t.php [L] And when I click on the link http://test4.dev.3klika.ru/css/main.css , I get exactly the .css file, not the .php. (The .php file is, is available, contains a banal print ());