Custom 404 page not working, does anyone know why?

bamme

Senior Member
Hi all

I've tried to implement a custom 404 recently. First off, it worked. Now, it doesnt!

Im not sure why -- I've attached my htaccess file and also pasted the relevant code here (the custom 404 bit in bold)

Ive attached the entire file incase its something else in the htaccess file, or the actual placement of the custom 404 bit, thats causing the problem. I've given it a .txt extension incase anyone has problems opening (but I am not using this extension for my actual file!)

Would be great to get some help here as it's a right pain - we've moved a lot of pages and a custom 404 is most definitely needed for those pages we can't 301.

Here is the actual 404 page: http://sanyachinatravel.com/notfound.php
I have the htaccess file in the root folder of the website.

Thanks!
Emma
 

Attachments

  • htaccess.txt.zip
    6 KB · Views: 1
oops forgot to paste..

RewriteEngine on
RewriteCond %{HTTP_HOST} sanyachinatravel\.com [NC]
RewriteCond %{HTTP_HOST} !^www\.sanyachinatravel\.com [NC]
RewriteRule ^(.*) http://www.sanyachinatravel\.com/$1 [L,R=301]
ErrorDocument 404 /notfound.php

redirect 301 /general_links/about-us.php http://www.sanyachinatravel.com/about/index.php
redirect 301 /general_links/customer_care.php http://www.sanyachinatravel.com/about/index.php
redirect 301 /general_links/about-us.php Tailor Made Holidays to China and the Far East
(...etc etc)
 
Its not a cms :/ its done by hand.. I don't really understand what you mean, any custom 404 tutorial says do it with htaccess right.. Sorry bit confused!
 
if you see the link i posted, i made a custom 404 page. it used to work.. im not sure why it stopped. i followed a tutorial which said to modify htaccess in the way shown in bold
 
Back
Top