66 posts
  • 3 Years of Membership
  • Collector Level 1
jozevodinar
says

I would like to make that if the file/directory/ doesn’t exist it would take the visitor to www.mysite.com/error404.php How can i make this? Thanks for the help ;p

637 posts
  • 5 Years of Membership
  • Author Level 2
  • Collector Level 2
  • Exclusive Author
Thecodingdude
says
66 posts
  • 3 Years of Membership
  • Collector Level 1
jozevodinar
says

Don’t understand this :(

I need so if they enter www.mysite.com/djsuifojdsf.php www.mysite.com/djsuifojdsf123434.php or any file/page that doesn’t exist on my hosting, that it would redirect to www.mysite.com/error404.php

767 posts
  • 6 Years of Membership
  • Author Level 3
  • Collector Level 4
  • Exclusive Author
+4 more
outandouter
says
66 posts
  • 3 Years of Membership
  • Collector Level 1
jozevodinar
says

A .htaccess file is your answer. http://www.htaccessbasics.com/404-custom-error-page/ http://net.tutsplus.com/articles/news/htaccess-files-for-the-rest-of-us/
Ah thank you. Problem is i already once made .htaccess file and it is hidden on cPanel… How could i edit it, or how can i make another, since it will not let me make 2 with same name…?
973 posts
  • Affiliate Level 2
  • Author Level 4
  • Beta Tester
  • Collector Level 4
+6 more
aaranmcguire
says


A .htaccess file is your answer. http://www.htaccessbasics.com/404-custom-error-page/ http://net.tutsplus.com/articles/news/htaccess-files-for-the-rest-of-us/
Ah thank you. Problem is i already once made .htaccess file and it is hidden on cPanel… How could i edit it, or how can i make another, since it will not let me make 2 with same name…?

\\

\\

145 posts
  • Collector Level 1
  • 3 Years of Membership
  • Exclusive Author
  • Romania
PixFee
says

After you find the .htaccess file add this into it:

ErrorDocument 404 "/404.html"

”/404.html” is the location of your custom error page.
by
by
by
by
by
by