What is the ID of your error page? Or is it an actual file?
It’s a page id - current one is 166 - perhaps I should create a solid XHTML page not rendered by MODx?
Can’t move host - its the clients decesion.
How can you change it in the MODx manager to remove the automatic if unavailable try and load the homepage ID? If i remove any id in the show this page ID when the site is unavailable it auto selects the homepage - I want to remove this and set it via htaccess to a full XHTML page I have created. Is that possible?
-
☆ A M B ☆
- 24,524 Posts
Create a plugin using the OnPageNotFound event.
-
☆ A M B ☆
- 24,524 Posts
A plugin is PHP code. You would need to send headers then exit.
Here’s a couple of interesting tidbits of knowledge culled from the PHP documentation:
if you use php to create custom error pages (such as header(’HTTP/1.1 500 Internal Server Error’);) Internet Explorer ignores you custom page unless it is at least 512 (or sometimes 1024 bytes)
IE ignores custom error pages that are less than 512 (or from what i’ve read 1024) bytes.
I strongly recommend, that you use
header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
instead of
header("HTTP/1.1 404 Not Found");
http://php.net/manual/en/function.header.php
Use no php start and end tags in plugin code...
Your error page:
http://www.sportingfish.co.uk/166 works! 
I think you have a host setting turned on in addition to just turn off.
You might check out $modx->sendRedirect(). It will forward the user to a URL and set the headers for you (if mrhaw’s suggestion doesn’t work).
Thanks guys - nothing seems to work... seems to be an issue with the host... crap hosting!