1

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 a .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/.

2

Your can add into httpd.conf container for <Directory>:

AllowOverride None

and affected .htaccess will be effectively ignored.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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