Comments are super important, especially in a large file. They help you remember what a specific chunk of code does, so you, or someone else, are able to quickly understand the file when looking at it on a later date.
Commenting is super simple, just follow these two rules!
Example One:
ErrorDocument 404 /error/404.html
# Hi! I am a super comment!!!
ErrorDocument 403 /error/403.html
Example Two
##########
#READ ME!
###########
ErrorDocument 403 /error/403
Advertisement
Don't copy this one!
Bad example:
ErrorDocument 401 /error/401
ErrorDocument 404 /error/404 #Not here!
That's it! Super simple, but you will thank yourself when it saves you time in the future. Happy coding!
Advertisement
Article Author
Related Articles
Is your website ready to go live? It’s always a good idea to block people from accessing files they shouldn't, like your .htaccess file for example! This code will block access to any files beginning ...
Advertisement
All code and content © 2023. Contact Us to learn more.