Dockerfile icon indicating copy to clipboard operation
Dockerfile copied to clipboard

.htaccess ErrorDocument: *.php not found, redirect not working

Open Cyb10101 opened this issue 5 years ago • 0 comments

Shouldn't the .htaccess file redirect to error documents or do I have to add something of my own, similar to the one here /opt/docker/etc/httpd/conf.d/10-error-document.conf?

.htaccess file:

ErrorDocument 404 /404-not-found.html

Works:

  • http://localhost:8080/not-found.html
  • http://localhost:8080/not-found/

Not working:

  • http://localhost:8080/not-found.php

Response header:

HTTP/1.1 404 Not Found
Date: Wed, 28 Oct 2020 13:07:26 GMT
Server: Apache/2.4.38 (Debian)
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

Response text:

File not found.

Cyb10101 avatar Oct 28 '20 13:10 Cyb10101