Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|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 '12 at 17:20
    
He didn't show a URL pattern - he showed a filename, file.php. –  adaptr Jan 12 '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 '12 at 17:53

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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