Apache Ignoring/Not processing .htaccess file

I was getting very frustrated one day wondering why it appeared my .htaccess file was being ignored and not processed by Apache.  No matter what I did it was obvious that Apache didn't care about my .htaccess file.  Then I realized that the default settings must be in effect, which is that my vhost didn't explicitly allow me to override the default settings.

This usually comes down to your vhost settings. Make sure you have an entry like this in your Apache vhost settings in order for .htaccess files to be processed, otherwise the default .htaccess settings in /etc/httpd/conf/httpd.conf are what take effect.

<Directory "/path/toyour/documentroot">
Options FollowSymLinks
AllowOverride All
</Directory>

 

As you can see above, you just need an entry like this to fix the problem.  Be sure that the path in the <Directory directive is the one to your document root for the vhost in order to get the desired results.

Now your htaccess files will work just fine in Apache as you intended them to.

Latest Articles

  • File /etc/vz/conf/ve-vps.basic.conf-sample not found: No such file or directory - Openvz Error solution
  • Ubuntu 10 Nvidia Drivers Not Updated After Kernel Update Solution/How-To Manually Rebuild nvidia kernel modules for Ubuntu
  • What's Needed To Fix Linux
  • mdadm/Debian problem
  • iptables block torrents/torrenting
  • vmware Failed to initialize monitor device 95% power on
  • OpenVPN don't use bridgestart.sh or bridge at all use iptables
  • postfix lopback error solution
  • Drupal/MySQL database error: PDOException: SQLSTATE[42000] [1044] Access denied for user 'db_user'@'localhost' to database 'dbname' in lock_may_be_available() (line 167 of /home/user/public_html/includes/lock.inc).
  • How To Burn ISO Image using cdrtools/dvdrtools for Linux/Unix Ubuntu/Debian/RHEL/Centos etc..
  • Ubuntu Suspend Solution Fix blank screen laptop/computer won't come back
  • iPhone Restore/Backup Location of Notes and Contact/Address Book
  • Install Android SDK and start testing on Debian/Ubuntu: How To Guide/Tutorial
  • gocr - free Linux OCR (Optical Character Recognition) conversion tool
  • Linux Kernel Panic Messages - Symptoms of bad RAM module/stick
  • Hitachi HDD/Drive RMA Process Experience
  • convert carat ^M/M Windows based text files to Linux
  • MySQL Import CSV data tutorial guide
  • scp not found - solution
  • vino crashed/stopped working, restart vino manually without rebooting