dcusimano

Member
Feb 24, 2008
16
5
53
Toronto, Ontario, Canada
When I logged into WHM 66.0.17, the feature showcase showed:

.htaccess Optimization
The .htaccess Optimization feature reduces the paths Apache will check for “.htaccess” files to the user’s home directory, which can significantly boost server performance.​

The Release Notes for version 66 says:

.htaccess search optimization
In cPanel & WHM version 66, on new installations, we configure Apache to only search for .htaccess files in the /home/USERNAME/ directory and its subdirectories, where USERNAME represents the account's username. This decreases the number of locations to search for .htaccess files, which improves the speed of Apache searches. We display a feature showcase item to enable this feature for already-installed systems.​

These descriptions appear to be inconsistent. The showcase says only the user's home directory is searched, yet the release notes say the home directory *and* its subdirectories. Which is it?

Also, the release notes say "This decreases the number of locations to search..." So were there some directories outside of the user's home directory (and its subdirectories) that were searched before? If not, then how is there a decrease?

Exactly what directories are searched with the feature enabled?
Exactly what directories are searched with the featured disabled?
How can this feature be enabled/disabled later (outside of the showcase)?

Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
Hello,

Exactly what directories are searched with the feature enabled?
For the recommended "Search "Home Directory" and below" option, the .htaccess files in your account's subdirectories are recursively searched in the /home/$username/ directory. EX:

/home/$username/.htaccess > works
/home/$username/public_html/.htaccess > works
/home/$username/public_html/123/.htaccess > works
/home/$username/public_html/123/456/.htaccess > works


Exactly what directories are searched with the featured disabled?
If you enable the "Use "Document Root" and below" option, the .htaccess files in your account's subdirectories are recursively searched in the /home/$username/public_html (or whatever is configured as the document root for the domain name) directory. EX:

/home/$username/.htaccess > doesn't work
/home/$username/public_html/.htaccess > works
/home/$username/public_html/123/.htaccess > works
/home/$username/public_html/123/456/.htaccess > works


These descriptions appear to be inconsistent. The showcase says only the user's home directory is searched, yet the release notes say the home directory *and* its subdirectories. Which is it?
Both descriptions are correct, however we updated the release notes to further clarify that it includes the account's home directory and it's subdirectories.

Also, the release notes say "This decreases the number of locations to search..." So were there some directories outside of the user's home directory (and its subdirectories) that were searched before? If not, then how is there a decrease?
Yes, previously the default configuration was to search for .htaccess files outside of the account's home directory as well. EX:

/.htaccess
/home/.htaccess


How can this feature be enabled/disabled later (outside of the showcase)?
This feature is controlled with the "Optimize .htaccess (AllowOverride)" option in "WHM >> Apache Configuration >> Global Configuration".

Let us know if you have any additional questions.

Thank you.