cancel
Showing results for 
Search instead for 
Did you mean: 

Custom 404 Page

GandD
Member

Does anyone know if it's possible to have a custom 404 page?

 

Any ideas would be helpful!

 

Cheers

30 REPLIES 30

techy
Member

ok Dave,

 

I can get FTP fine

I can't see the .htaccess file  can i re-create this and upload it again?

 

regards

 

Richard

dave
Guru

Yes, the .htaccess file is not present by default.

 

All you need to do is create it in a text editor application and upload it.

techy
Member

does it only contian the text in your posted solution?

techy
Member

SORTED THIS - you only have to have the one line in the .htaccess file

thanks, 🙂

Nick_Watson
Member

Hi Guys,

 

I've tried enabling my custom 404 page by creating and uploading a .htaccess file to my public folder.

 

However, as soon as I do so, the entire website becomes inaccessible and returns the following:

"Internal Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, or webmaster and inform them of the
time the error occurred, and anything you might have done that may have caused
the error.

More information about this error may be available in the server error
log."

 

The contents of my .htaccess file was as follows:

 

ErrorDocument 404 http://www.fluidmastering.com/custom_404.html

 

...any ideas???

 

ta,

 

Nick

duskjome
BT Partner
BT Partner

As long as you're sure that is the only text in the htaccess and you have no other redirects or mod rewrites on your site you should be fine. I tried that same text with a similar html file on a test site on BT and it worked like a charm.

Nick_Watson
Member

Hi duskjome,

 

thanks for the response - sorry it took me so long to get back; I mistakenly assumed that the forum would notify me by email if anyone added to the thread.

 

Anyway - to recap, you say you've tried it and it worked - well I've just tried it again and it sure didn't; so I don't know where to go next...

 

I don't have any 'redirects' or 'mod rewrites' on the site that I know of; I have a 'robots.txt' file which is set to allow evrything and disallow nothing (only coz I was advised that every site should have one for SEO purposes), and the rest is just html files, image files, a couple of text documents, a css, and some javascript. I haven't put anything there that would alter the behaviour of the server as far as I know.

 

If you have any suggestions as to how I can resolve this please let me know!

 

best wishes,

 

Nick

dave
Guru

A 500 internal error message usually means that there is some invalid syntax somewhere in your .htaccess file.

 

How are you creating the file? Are you creating it in Windows notepad? If so, then this can cause some problems due to it inserting a character known as a BOM.

 

Try creating it in something like Notepad++ and save it as non BOM and it should work.

Nick_Watson
Member

Thanks Dave!

 

Yes - I did create it using Windows Notepad. I guess that's why it BOM'ed (sorry).

 

I've never heard of "Notepad++" until now - I'll download and give it a go, and will let you know how I get on!

 

thanks again,

 

Nick

Nick_Watson
Member

I hate it when sh*t doesn't work.

 

But it does make it that bit more satisfying when it finally does Smiley Very Happy

 

Many thanks Dave! You sure know your stuff.

 

best,

 

Nick