Trying to use an errordocument to handle

New Page

Getting a 404 not found error when trying to use ErrorDocument

Ask

Asked 9 years, 11 months ago

Modified 7 years and 11 months ago

Seen 206,000 times

Report this ad

This question shows research effort; it is useful and clear

27

This question shows no research effort; unclear or not useful

5

Please mark this question.

View activity on this post.

I know this thread has been discussed a lot on the web and here, and I tried almost every method, but I still have the same problem.

This is my URL on my local server (MAMP)

http://localhost:8888/hellothere/index.php

And I tried to insert a wrong path to take me to the wrong page, like below:

http://localhost:8888/hellothere/eiurgiuerib

Instead of taking me to the error page, it displays:

Not Found The requested URL /hellothere/eiurgiuerib was not found on this server. Additionally, a 404 Not Found error was encountered while attempting to use an ErrorDocument to handle the request.

My 404 page is in the error directory. And in my .htaccess file I included this:

ErrorDocument 404 /Error/404.php

  • php
  • apache
  • .htaccess
  • status-code-http-404

To share

Share a link to this question

Copy link CC BY-SA 3.0

Follow

Follow this question to receive notifications

asked on October 6, 2012 at 1:47 PM

User avatar of user1725155

user1725155 user1725155

335 1 1 gold badge 3 3 silver badges 11 11 bronze badges

3

  • 1

    Custom error page not working. So what should I do?

    – utilisateur1725155

    6 octobre 2012 à 14:06

  • pouvez-vous montrer votre schéma de dossier ?

    –VariableStatique

    6 octobre 2012 à 14:17

  • Veuillez ne pas utiliser d’images pour afficher des données textuelles. Il dit que /Error/404.php est introuvable – Vérifiez l’orthographe, la casse et les autorisations de répertoire et de fichier. Vous devriez pouvoir invoquer 404.php à partir de l’adresse du navigateur — est-il trouvé ?

    – Phil Perry

    19 mai 2014 à 17:00

Ajouter un commentaire | 

2 réponses2

Trié par : Réinitialiser par défaut

Score élevé (par défaut) Tendance (les votes récents comptent plus) Date de modification (le plus récent en premier) Date de création (le plus ancien en premier)

Cette réponse est utile

cinquante

Cette réponse n’est pas utile

Afficher l’activité sur ce post.

The ErrorDocument directive, when a local URL path is provided, expects the path to be fully qualified from DocumentRoot. In your case this means the actual path to the ErrorDocuments

ErrorDocument 404 /hellothere/error/404page.html

compare

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

answeredOctober 6, 2012 at 2:47 PM

StaticVariable user avatar

Static variable Static variable

5 243 4 4 gold badges 22 22 silver badges 45 45 bronze badges

3

  • Another thought, if in my index.php page I just add this line of code ” header(“HTTP/1.0 404 Not Found”); ” It won’t take me to the 404 page, why?

    – user1725155

    October 6, 2012 at 2:56 PM

  • @user1725155 you should read this post custom 404 not working

    –StaticVariable

    October 6, 2012 at 3:00 PM

  • Thank you very much, I was repeatedly trying to beat this in apache from the server root not the document root.

    – kit r007

    February 8, 2019 at 3:43 PM

Add a comment | 

Report this ad

This answer is helpful

1

This answer is not helpful

View activity on this post.

When we apply the local URL, the ErrorDocument directive expects the full path of the DocumentRoot. So,

ErrorDocument 404 /yourfoldernames/errors/404.html

compare

Share a link to this answer

Copy link CC BY-SA 3.0

Follow

Follow this answer to receive notifications

modified on October 4, 2014 at 10:44

NullPoiиteя user avatar

NullPoieteя

55.5k 22 22 insignes d’or 123 123 insignes d’argent 140 140 insignes de bronze

répondu le 8 mars 2013 à 6:19

User avatar of karthik k

karthik k karthik k

49 3 3 insignes de bronze

Ajouter un commentaire | 

Question très active . Gagnez 10 points de réputation (sans compter le bonus d’association) afin de répondre à cette question. L’exigence de réputation aide à protéger cette question contre les spams et les activités sans réponse.

Pas la réponse que vous cherchez ? Parcourir les autres questions étiquetées

  • php
  • apache
  • .htaccess
  • code-de-statut-http-404

ou posez votre propre question.

  • Le blog à débordement
  • Temps de disponibilité Five Nines sans usure du développeur (Ep. 488)

  • Nous détestons Scrum et Agile… quand c’est mal fait (Ep. 489)

  • Présenté dans Meta
  • Modifications récentes du contraste des couleurs et mises à jour d’accessibilité

  • Reviewer overboard! Or a request to improve the onboarding guide for new…

  • Do I need to explain other people’s answers in code?

Report this ad

Report this ad

Leap

5

PHP 404 header not working

Related

443

How can I properly handle 404 in ASP.NET MVC?

1251

Reference – What does this error mean in PHP?

27

ErrorDocument 404 /404.php not working in .htaccess file in PHP

0

Getting an error in codeigniter: A 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request

0

htaccess: error 404 not found when trying to ErrorDocument

1

htaccess – 404 redirect error

0

Xampp error “Additionally, a 404 Not Found error was encountered while attempting to use an ErrorDocument to handle the request.”

burning questions from the net

  • Is the fake ice cream on top of an ice cream truck called an “ice cream figure”?
  • Complex Harmonic Oscillator Spectrum
  • How to get an item from the list
  • Can my 10 year ban be lifted with my new Canadian citizenship?
  • Why is t-test more appropriate than z-test for nonnormal data?
  • How important is it to have multiple gears on an e-bike?
  • Can prisoners of war be exchanged against their will?
  • What is this component? White SMD part marked “W”
  • What are the ideas behind the lack of quote removal and escaping in variable expansion?
  • Torch-like swapping for arrays?
  • Science fiction novel about a group of people stranded on a planet populated by automated war machines
  • Is it acceptable to resubmit a manuscript to another publisher if there is no response after three months?
  • “Every Saturday and Sunday”? What is it about?
  • looking for a manga name with a noble girl, maybe named Mary
  • What is the use case for disabling an index?
  • Are you installing an outlet in an electrical box with two sets of wires?
  • What is the area of ​​the SSME nozzle knowing only thrust at sea level and in a vacuum?
  • Dimension too large for a simple 3D image
  • securing a twisted beam
  • When is it really worth converting RGB to CMYK (if printers do it anyway!)
  • What is the smell after rubbing the quartz?
  • How might lottery and gambling work with accurate fortune tellers?
  • Conversion gradient differential
  • The meaning of Deuteronomy 28:43 and its fulfillment

hotter questions

question flow

Subscribe to RSS

question flow

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.


Video Trying to use an errordocument to handle

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…