I'm having a bit of trouble with my current web host. Here's a bit of a long story, when I'm looking for a short answer.
Currently if someone enters an invalid URL that contains %2F the server shows a 404 error page, and from my research so far the error page that is shown is the default error page, which is specified in the httpd.conf file.
I was reading that for this type of error the server throws a 404 before any domain specific rules are read, therefore this specific error page cannot be customized in my .htaccess file.
My problem is that my current host had placed some advertising code on the default error page, when I don't believe they should have. And reading their domain registration agreement it doesn't sound like they should have ads on this page anyways.
They say that they will place ads on your 404 error pages if you do not specify a custom error page, and if the "do not place ads on my non-custom error pages" is not set. They say that by not setting up custom error pages you authorize them to place these ads.
However, I DO have custom error pages set, and I have disabled the ads for "non-custom error pages" in the control panel. So based on this information I do not believe ads should be shown on the error page in question, because it cannot be customized, and the ads cannot be disabled, therefore according to their agreement I have not authorized the placement of these ads.
So I contacted tech support to see about getting the ads removed from the DEFAULT error page that is shown when errors, such as the %2F error, are shown. Ads would still be shown on the 404 error pages for users who fail to set their own custom error pages, or do not disable the ads. They seem eager to help, and they agree that the ads do not look very good.
However, the level of tech support seems to be about the same as you would expect to find in elementary school. No matter how many times I explain the problem, and exactly how to fix it, they come back explaining how they did one thing or another, and the issue should be "solved". Needless to say it is not solved, because as I've explained to them numerous times nothing they do in my .htaccess file will address this problem.
So I am wondering, is there any possible way that I can find the exact location of the Apache httpd.conf file through PHP/Perl? Or better still, the exact location of the default 404 error page? At least if I know where the file was I could give them even more specific instructions on how to fix this.
I never would have thought that explaining how to find the default error page for Apache would have been so hard, especially when explaining it to a hosting provider.