Link to home
Start Free TrialLog in
Avatar of chestertbear
chestertbear

asked on

Settin A Custom 404 page in Xampp

Hi All,
I'm running Xampp 1.7.3 on Windows XP SP3.

I need to set the customer 404 error page so that it directs to
web address: /mycms/newversion/index.php
file address: c:/xampp/htdocs//mycms/newversion/index.php

I changed /xampp/apache/conf/extra/httpd-multilang-errordoc as follows;
ErrorDocument 404 c:/xampp/htdocs//mycms/newversion/index.php

That didn't work.

I then tried setting
Alias /error/ "C:/xampp/htdocs/mycms/newversion/"
(Note that setting the Alias "/error/" is not desirable because it screws up all of the other error page settings.  I just want control over the 404 error.)

and
ErrorDocument 404 /error/index.php

That redirected the error to /index.php, so I changed it to read
ErrorDocument 404 /error/mycms/newversion/index.php

After each change, I stopped and restarted Apache.

That worked for about an hour before I wen to bed, but no longer worked this morning.  I get a browser "Page Not Found" error in all major browsers.

How do I set the 404 error page in Xampp?
Avatar of Bryon H
Bryon H
Flag of United States of America image

can you try using a relative path, like your last example, but to an html page?
ASKER CERTIFIED SOLUTION
Avatar of chestertbear
chestertbear

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chestertbear
chestertbear

ASKER

...Although...
IE seems to cache its error response.
The address I was using before to test (which kept failing) was
/mycms/newversion/test
Because /test doesn't exists, I should get my error page.
In IE, I don't.  I continue to get the browser generated Page Not Found Error.
But if I enter a new non-existent address, I get my custom error page.
It's all somewhat confusing.