Recently, I switched to Zend Server CE from a manually installed AMP package (Apache/MySQL/PHP) to make use of Zend’s lightweight environment and easy install package. In doing this, I found that it broke the permalinks associated with WordPress. Despite mod_rewrite being enabled, and the “Pretty Permalinks” code being in the .htaccess file, it still didn’t work.
To fix this problem do the following:
- Open up httpd.conf. (On Windows, the default location of this file is C:Program FilesZendApache2conf.)
- Find the line with <Directory />.
- Make sure +FollowSymLinks is present on the Options line. (i.e. Options +FollowSymLinks)
- Change AllowOverride None to AllowOverride All.
- Restart Apache.
AllowOverride controls how .htaccess files are used. When AllowOverride is set to None, users cannot override the configurations set in httpd.conf for particular directories. While the .htaccess in this client’s WordPress directory was correct, Apache wasn’t allowing it to override the default settings as stated in httpd.conf. It is definitely worth it to learn more about how to configure Apache so that you can have a secure and well-performing environment, especially if a lot of developers work on the same production server.
If you have similar experience, we would love to hear what you have to say. Perhaps it will save someone else a minute or even a few hours.