I’ve been spending way too much time recently on the ‘work-in-progress’ www.douglawrence.org website. So when I came across a custom 404 theme ‘Lost in Space – Error 404’ (by adraft) on ThemeForest, I couldn’t resist downloading and customising it to work with my website. It’s the best $4 I’ve ever spent.
douglawrence.org is based on a WordPress theme called U-Design. The 404 page, however, is based on HTML. I placed the 404 theme’s HTML code in a directory called custom404 at the top level within ‘httpdocs’. Fortunately U-Design had a custom 404 page written in PHP, I backed that up, then used the following code to redirect from the 404 page ‘PHP’ to the custom 404 (index) page.
This may not be the most elegant solution but is works. You can try it by visiting www.douglawrence.org/custom404/ or trying to reach a page that doesn’t exist on douglawrence.org.
I edited the text using Dreamweaver to include the ‘milk’ comment – well I had to really just to prove I’d done some work! 🙂