Friday, April 2, 2010

.htaccess :

These days, using is preferred over , mainly because you can use regular expression in the conditions (very handy), produce clean, more readable code. Here's an example. which I use for my php-generated style sheets..

parse file.css and file.style with the php machine..
# handler for phpsuexec..

SetHandler application/x-httpd-php



Any files with a *.css or *.style extension will now be handled by php, rather than simply served up by Apache. And because you can use regexp, you could do stuff like , which is handy. Any statements you come across can be advantageously replaced by statements. Good to know.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home