66 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
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

629 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 100 and 1 000 dollars
Thecodingdude says
66 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
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
  • Author had a Free File of the Month
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Sold between 1 000 and 5 000 dollars
outandouter says
66 posts
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
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…?
972 posts
  • United Kingdom
  • Attended a Community Meetup
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Sold between 5 000 and 10 000 dollars
  • Has been a member for 3-4 years
  • Microlancer Beta Tester
  • Bought between 100 and 499 items
  • Referred between 10 and 49 users
  • Exclusive Author
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
  • Bought between 1 and 9 items
  • Has been a member for 1-2 years
  • 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