mkdir /usr/local/apache/customerror
Alias /errorfolder /usr/local/apache/customerror/
ErrorDocument 400 /errorfolder/400.shtml
ErrorDocument 401 /errorfolder/401.shtml
ErrorDocument 403 /errorfolder/403.shtml
ErrorDocument 404 /errorfolder/404.shtml
ErrorDocument 500 /errorfolder/500.shtml
Assuming you have root access to the server, this can be done via the command line using the command provided in my last response:1) Create a directory in /usr/local/apache to store your custom error messages. In this case, I have named the directory "customerror":
how to do this? and how to upload the error pages which created by me to the customerror file?
mkdir /usr/local/apache/customerror
vi /usr/local/apache/customerror/404.shtml
Yes, this can be achieved via "cPanel -- Advanced - Error Pages":if the user want to overrite the error pages? could he overrite those error pages by his cpanel or .hactess.
mkdir /usr/local/apache/customerror/images
ErrorDocument 404 /errorfolder/404.html
/usr/local/apache/customerror/images
i can't find the customerror/images file, so i don't know where should i upload my images to and how in vi to invoke it.eg:root
csf
public_ftp
cpanel3-skel..
....and so on
<img src="">
background:url(".....")...;
/usr/local/apache/customerror/images
/usr/local/apache/customerror/404.shtml
style.css
I am happy to see you were able to determine the solution. Thank you for updating us with the outcome.does not matter
with allowoverride option in apache conf it's possible to edit .htaccess and add following
ErrorDocument 404 /new404.html
You will have to use the full path to the image in your script instead of the soft path (e.g. /home/$username/public_html/images/file.jpg instead of images/file.jpg).But, I now have another issue... I am embedding an image into the .shtml or .html but the images are not showing... The paths appear incorrect. For example, if I visit domain.com/xxxx.html, the page loads fine but images within xxxx.html that are in /images/ are instead pointing to the domain.com/images/ directory.....