Two “.htaccess” Files Located in Different Directories?

In general, Apache will use the most specific .htaccess to the resource being requested. This means that, for accessing files in /httpdocs/wordpress/, /httpdocs/wordpress/.htaccess will be used. Access to /httpdocs/foo/ will use /httpdocs/foo/.htaccess and, if that doesn’t exist, it will use /httpdocs/.htaccess.

If your document root is pointing to /httpdocs/wordpress/, then users will see http://www.example.com as your WordPress directory. Also, if your /httpdocs/.htaccess includes rewriting to hide the wordpress in your folder name, the same will happen.

Leave a Comment