FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


error page





fdforumhk
i am a new member, and would like to create a forum with this web hosting
i would like to ask am i able to create my own 404 error page? Hope someone can answer my question.
Indi
Do you know how to make and use .htaccess files? First create a file in your public_html directory called .htaccess. You might have to make its permissions 644 - i can't remember, try it without first.

Then add the line:
Code:
ErrorDocument 404 /path_to_your_error_page/error_page.html

You can add other error types, and even use a PHP script instead of a static page:
Code:
# 301 Moved Permanently
ErrorDocument 301 /error.php?type=301

# 404 - Not Found
ErrorDocument 404 /error.php?type=404
Jean-Luc
I agree with Indi, but 301 is a redirect code and it should not be treated as an error code. Still, the advice from Indi is the way to go for errors in the 400 and 500 ranges.

Jean-Luc
HalfBloodPrince
And if you're having trouble getting the .htaccess file open for editing, if you're using FileZilla (or any other FTP program) just add .txt to the end of the filename (making it .htaccess.txt or anything other name ending in .txt) then open it in notepad and edit it. If you downloaded then edited it, upload it again and rename it .htaccess (without .txt) and if you edited it straight from FileZilla just rename it back.
Indi
Jean-Luc wrote:
I agree with Indi, but 301 is a redirect code and it should not be treated as an error code. Still, the advice from Indi is the way to go for errors in the 400 and 500 ranges.

Jean-Luc

Yes! You're right, my bad. >_< i just picked the first number that popped in my head that i knew the meaning of. That was sloppy of me, sorry!
Related topics
Error 404 ..... How to Hide ...
509 b/w error
Private Page
CUSTOM ERROR PAGES
PhpMyAdmin
Replace the 404 ERROR PAGE
Coustm error page (problem)
IIS installation under XP getting 401.1 error
about 404 error page
My Personal Web Site - especially on the Japan trip
how to edit my 404 error page?
So, how is my new error page?
Checking for values in database and displaying error page
PHP error page, die()
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.