How can I make a 404 error page in php?
Category: General Server Setup
I know there's option to customize 404 Not Found error page in cPanel, but it only allows editing .shtml file. But I'd like to process request_uri based on the data in my database. It looks like .shtml does not process php codes, then what option can I have?
OTHER ANSWERS
|
0
|
Hi Wonjae, Thanks for your question. I'm more than happy to assist you. Error handling is typically done through your .htaccess file. You should be able to add a line of code to your .htaccess file in the public_html folder to re-direct all 404 errors to a 404.php page. Here's the code to add to the .htaccess file to do so: ErrorDocument 404 /404.php Then is the same folder, you'll want to create the 404.php page and that should be it. If you need further assistance please feel free to contact us. Thanks! Tim S |
Like this Question?
Tweet
Latest Questions
If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Recent QuestionsNeed more Help?
Search
Ask the Community!
Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.
Current Customers
| Chat: | Click to Chat Now | E-mail: | support@InMotionHosting.com |
|---|---|---|---|
| Call: | 888-321-HOST (4678) | Ticket: | Submit a Support Ticket |


