I experienced a very weird phenomenon! I use an url that is set up like /err/?e=404
for error pages. I also reference them as an ErrorDocument
in .htaccess
.
I only chose the short version "err", because "error" causes issues! By simply changing "err" to "error", it ceases to work anymore! I get an error 403, but not with my error page, but rather the default error page by apache. This however only seems to apply to my main domain I installed the server with. The other domains don't seem to be influenced by this.
I'm currently testing this using Windows and I get this entry in the error log
AH01276: Cannot serve directory C:/xampp/apache/error/: No matching DirectoryIndex (index.php,index.pl,index.cgi,index.asp,index.shtml,index.html,index.htm,default.php,default.pl,default.cgi,default.asp,default.shtml,default.html,default.htm,home.php,home.pl,home.cgi,home.asp,home.shtml,home.html,home.htm) found, and server-generated directory index forbidden by Options directive
Apparently, /error means something very special to apache2.4 itself. What is it? Why am I not allowed to use this path in htaccess?
On my production system I use
- Debian 8.3
- Apache 2.4
- PHP 5.6.14