Apache doesn't let .htaccess use frills such as Location, Directory - without these, is it possible to match a url pattern and set php configuration settings (via php_value) in a .htaccess file?

link|improve this question

60% accept rate
feedback

2 Answers

You can, however, use Files and FilesMatch in a htaccess file.

link|improve this answer
The problem is you can't match a URL pattern - so if something is handled through a single index.php / front controller it will have unwanted effects. – thinice Jan 12 at 17:20
He didn't show a URL pattern - he showed a filename, file.php. – adaptr Jan 12 at 17:46
Apologies - I was just trying to fill in my question a bit; it looks bare without some form of example. I didn't intend on contradicting my question. – thinice Jan 12 at 17:53
feedback

Location and Directory don't make as much sense for .htaccess files because you can just put them in the directory that it matches to.

link|improve this answer
1  
Unless a directory doesn't exist and everything is routed through a front controller – thinice Jan 12 at 17:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.