I have multiple css files in a directory (style0.css, style1.css etc..) How can I redirect a request to these css files with htaccess so that a php can process the requested css file.
ex. /styles/style0.css -> /includes/compressor.php?i=style0.css ?
Add an .htaccess to your css directory with these two lines. You can now add php code to your css files, and it will be processed :
AddHandler application/x-httpd-php .css
php_value default_mimetype "text/css"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With