I've decided to put the advanced stuff on hold for now and write 2 tutorials for the 'HTML' tutorial section.
.htaccess -- custom error pages
.htaccess -- preventing image hotlinking
I will lay them out the same starting with saying there are many things you can do with .htaccess files but this is one of the more popular uses. For now I won't be including this, but when I've done both articles - is it ok to link them to each other under a title, 'Related'?
EDIT: I've started the error doc one already but unsure on something. If I can set an error page to be either of the below, what's the point of the latter? What advantages does it have over the first? :
Code:
ErrorDocument 404 /errors/notfound404.html
ErrorDocument 500 "The server is buggered!"
EDIT2: I'm almost finished with this error page tutorial and I was wondering if there was a way we could code this error page to tell the administrator what page has the broken link? My first thought was using a flat file database like WebErrorLog.txt that gets written to in the 404 page itself stating only the most vital info:
Quote:
|
BrokenLink /directory/pageWithBrokenLink.html
|
The format in which this is written is not important so long as our webadministrator can look at this log and know which page to fix. Anybody know how to do this/provide linkage?
I was also thinking that the webadmin can be emailed every time a user clicks a broken link with the same info as the above quote?
Or is there an easier/predetermined route of doing this?
(lets assume that the admin is too lazy to check all links before FTP to webserver)