Solved

redirect with 404.shml file

Posted on 2015-02-23
3
8,182 Views
Last Modified: 2015-02-24
Is there a simple way to redirecr a page whena 404 error is found, using cpanel?
0
Comment
Question by:robrodp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 79

Accepted Solution

by:
arnold earned 500 total points
ID: 40627517
You need to use/setup a custom errors in the config of the web server.

Presumably this is an Apache web server?

ERRORDOCUMENT error document or url to open
ErrorDocument 404 http://somesite

http://httpd.apache.org/docs/2.2/custom-error.html
0
 

Author Closing Comment

by:robrodp
ID: 40627527
Got it... thx
0
 
LVL 11

Expert Comment

by:RedLondon
ID: 40627626
I realise the question is closed but the question was "using cPanel".  Yes.  cPanel tries to serve the file /404.shtml by default, but usually gives a plain error 500 page saying that it had a 404, failed to find either 404.shtml or 500.shtml.

The cPanel page at https://YOURSERVER.com:2083/frontend/x3/err/index.html lets you enter text to display as 404.shtml, 500.shtml and the others.

Obviously creating/editing a .htaccess file isn't hard, but it is beyond a lot of people.  Using that cPanel page shouldn't be beyond many, certainly not any of the people who would know to worry about that kind of thing.
0

Featured Post

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question