Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a local LAMP stack (without the MySQL. LAP stack? Anyways..) and I am using this as a development environment for a production website. The site is placed in a sub-directory of the Apache2 document root and managed by Git.

My Issue is: I have an .htaccess file tracked in that subdir by Git for URL rewriting on the production server. On my local test site, these rewrite rules break almost everything (because the site is in a subdir, not the doc-root).

Is there any way to override/disable that .htaccess file without modifying anything in the subdir?

My doc root is /var/www/ with the site being hosted at /var/www/foo/

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Your can add into httpd.conf container for Location (or Directory - TBT by you, I'm too lazy) with Allow Override None and affected htaccess will be effectively ignored

share|improve this answer
    
That, interestingly enough, does not work. The .htaccess is still parsed. –  3321thec Oct 14 '11 at 17:43
    
Strike that... Works now. Go figure. Local cache? Who know. Thanks! –  3321thec Oct 14 '11 at 17:48
    
show config part. It must work, if was correctly defined. If it's virtial host, you'll have to modify virthost (and restart Apache, yes, after any editing conf). If you want, I can build dumb test-case on my side –  Lazy Badger Oct 14 '11 at 17:50
add comment

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.