I'm running Apache on my local computer (mac) with Mod_Rewite enabled and Allowoveride All set in XAMPP's httpd.conf file.
These are my rules, snippet of httpd.conf file -
RewriteEngine On
RewriteRule ^/setup/css/userlayout.css /setup/css/userlayout.php
Alias /ms "/Users/web/wwwroot/ms"
<Directory "/Users/web/wwwroot/ms">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
In my index.php file I have -
<link rel="stylesheet" type="text/css" href="setup/css/userlayout.css?u=1" />
And in my userlayout.php file is -
<?php
header('Content-type: text/css');
echo "#test{background-color:#000;}";
?>
Thats everything but the rules don't do anything. I'm not sure if I'm putting the rules in the right place and I understand that you can do this in a httpd.conf file and not the .htaccess file.