Error redirects
Is it possible to redirect using domain records?
As i've stated before we allow clients to create their own cpanel accounts using a sub-domain of our parent domain so they get their own set of records.
What we want to do if possible is alter the Zone template so that if there is a missing file/web page rather than see the "404 Not Found" the clients sub-domain would be redirected to a destination of our choice?
This record will mostly likely be a CNAME record.
Example
Clients website is located at clsub.mydom.com, someone types in clsub.mydom.com/lostfile.html then they would be redirected
Thanks!
-
Not possible no, but you can add a .htaccess file to new accounts that would redirect 404's. You can use custom errors: Custom Error Responses - Apache HTTP Server Version 2.4 To automatically add the .htaccess to the account you can use cPanel skel directory: Skeleton Directory - Documentation - cPanel Documentation 0 -
@Jcats thanks for the reply. This how i do it now with .htaccess, I was just looking for another way has clients can alter/delete that file where as I can stop access to their records. Anyhow thanks again ? 0 -
Just place it in the home directory, before public_html, very small chance it will get touched. 0 -
Alright, thanks for your advice. 0 -
Hello, I'm marking this thread as solved. Let us know if you have any additional questions. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments