I need to rewrite all the files in a directory and essentially make their extentions css instead of php. I want to do with with a .htaccess file within that specific directory.
What is the correct method of doing so and are there any special PHP headers I need to set the ensure the file is read as a .css file correctly?
I think that you rather want requests of
*.cssto be rewritten internaly to*.php. So try this:While
foois here the specific directory.You now should explicitly declare the output as
text/cssusing the following at the begin of the PHP script:Replace
<your charset>by whatever charset/encoding you are using (probablyISO-8859-1orUTF-8).