custom 404 error with fpm-php
Hi,
I would redirect the users to a specific page if an 404 error occurs.
I've insert in public_html an htaccess with this line: ErrorDocument 404 http://www.myurl.xx
but there is a problem: if a url with 404 code is a directory (http://mywebsite.xx/directory) work correctly, if the URL with 404 error is a page (http://mywebsite.xx/file.php) not work... the server return a blank page with "file not forund."
these are the characteristics of the server:
- centos 7 64 bit
- php 5.5 in FPM mode
in apache log file:
[Mon Oct 31 15:50:03.368412 2016] [proxy_fcgi:error] [pid 19512:tid 140729502365440] [client xx.xx.xx.xx:49490] AH01071: Got error 'Primary script unknown\n'
can i fix this problem?
Thank You in advance
Vito
Hi,
I would redirect the users to a specific page if an 404 error occurs.
I've insert in public_html an htaccess with this line: ErrorDocument 404 http://www.myurl.xx
but there is a problem: if a url with 404 code is a directory (http://mywebsite.xx/directory) work correctly, if the URL with 404 error is a page (http://mywebsite.xx/file.php) not work... the server return a blank page with "file not forund."
these are the characteristics of the server:
- centos 7 64 bit
- php 5.5 in FPM mode
in apache log file:
[Mon Oct 31 15:50:03.368412 2016] [proxy_fcgi:error] [pid 19512:tid 140729502365440] [client xx.xx.xx.xx:49490] AH01071: Got error 'Primary script unknown\n'
can i fix this problem?
Thank You in advance
Vito
Last edited: