4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by disposable_zero
0

1. Open Notepad.
2. Save as a regular text file (for example: file.txt).
3. Upload the file to your server and rename it to .htaccess (not file.htaccess, simply .htaccess.
)
4. Open the .htaccess file.
5. Write these two lines into your document:
ErrorDocument 404 http://your-site.com/error.html
ErrorDocument 403 http://your-site.com/error.html
6. Create a new html document and save it as error.html.
7. Upload it to your server - that's it!

0

OK, it's actually simple.
create a file called
htaccess.txt

In it type:

<File .htaccess>
order allow,deny
deny from all 
</Files> 
ErrorDocument 404 http://yourdomainname.com/error.html
ErrorDocument 403 http://yourdomainname.com/error.html

The first bit inside the File tag says that no one can view that file. The last part says to redirect to those to website incase of a 404 or 403 error. replace yourdomainname.com with the name of your domain. Now, create a file called error.html that will be your error page
Now upload to your server, and you are good to go!

0

Thanks for all the solutions, got it now. Had no idea it was that easy! Guess you learn something every day ;)

0

Hate to double post but it won't let me edit. Just wanted to mention that if you're coding this Romil wrote it:

order allow,deny

That actually locks out your whole site, had a mild heart attack for a second. It should be written:

order deny,allow

Other than that mistype it now appears to be working great. Thanks again!

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.