cancel
Showing results for 
Search instead for 
Did you mean: 

[PAYH] Use PAYH error_docs or my own with .htaccess

SoulBriski
Grafter
Posts: 179
Registered: ‎15-06-2007

[PAYH] Use PAYH error_docs or my own with .htaccess

Can anybody help with an error_docs issue?
I purposely mistyped a page address for my site and sure enough a 404 error was displayed.
Using Plesk CP, I edited the text in the not_found.html to prove that it was in fact that file that was being read.
Having proved that was the case, I decided to upload my own versions of error docs only to find I get  a permission denied error. Permissions for the error_docs folder are set at rwx r-x r-x and cannot be changed.
Since i couldn't upload my own, I edited the not_found.html in situ and tried to <!-- includeFILE="../httpdocs/head.inc" -->  and a stylesheet link <link rel="stylesheet" type="text/css" href="../httpdocs/jnmbc.css"> so as to maintain my own themed page design even when there is an error.
The page, when displayed in the browser, is the version with my edited text but the include statement doesn't work and neither does the link to my stylesheet.
On the ccgi version of my site, i used a .htaccess file to redirect users to an errors.php page passing the error number as a variable and therefore displaying the appropriate error page to the user as follows
ErrorDocument 403 http://www.mydomain.co.uk/errors.php?err=403
ErrorDocument 404 http://www.mydomain.co.uk/errors.php?err=404

IS there anyway I can have more control of the error_docs folder?
or
should I disable the 'Custom Error Documents' flag in the control panel and use my .htaccess
Sorry to draw this out but at least i have explained the problem as fully as possible
2 REPLIES 2
glyndev
Grafter
Posts: 620
Registered: ‎31-07-2007

Re: [PAYH] Use PAYH error_docs or my own with .htaccess

The folder is owned by "root" user so you cant upload to the folder.
But you can edit the files which are already there in the folder by copying and pasting the code / text from your own pc.
Just done a test. which works at https://devonports.plushost.co.uk/interes.php the images are loaded from the homepages server.
Hit the reload button a couple of times as well.
SoulBriski
Grafter
Posts: 179
Registered: ‎15-06-2007

Re: [PAYH] Use PAYH error_docs or my own with .htaccess

Thanks
Interesting use of random images!
I'm currently using the .htaccess method with the plesk custom error documents turned off but i will bear your method in mind. I just need to look at the include options that i have in place to maintain my theme