66 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 1+ items on Envato Market
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

633 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $100+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
Thecodingdude says
66 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 1+ items on Envato Market
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
  • Has been part of the Envato Community for over 5 years
  • Has sold $1,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Sells items exclusively on Envato Market
+2 more
outandouter says
66 posts
  • Has been part of the Envato Community for over 2 years
  • Has collected 1+ items on Envato Market
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
  • Has referred 10+ members
  • Has sold $5,000+ on Envato Market
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+5 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
  • Has collected 1+ items on Envato Market
  • Has been part of the Envato Community for over 2 years
  • Sells items exclusively on Envato Market
  • Located in 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by