|
Home » Other Tips » .htaccess » Custom Error Pages Custom Error PagesIf you've gone to a page that doesn't exist on major websites you've probably noticed that they use custom 404 pages. How do they do this? Among other ways, the .htaccess file allows us to build custom error pages. The first thing you need to do is create your error page. Go ahead and build it. Us the tutorial if you need a little help. Next, add the following code to your .htaccess file. ErrorDocument 404 /path/to/your/error404.html This tells Apache that you want it to return the file /path/to/your/error404.html file in place of a default file not found page. You can also use the same code for other errors. First Page « .htaccess » Deny Users by IP Address
|
