Deverill Posted August 2, 2003 Posted August 2, 2003 This is a two part question: 1. Is there an easy and safe (for TCH) script I can use to do a Un*x "touch" on my website files so they have a recent date? I'd like to do it about once per week, not all the time or even every day. 2. Is there a reason this is not a good idea? I know crawlers at one time devaluate pages that haven't recently changed and I suspect they still do. Parts of my site are historical and don't have need to change so should I do this? I know, I could use DW to add an extra space on my template and let it update everything but that's inefficient and I may start using alternative methods of web development thanks to the PHP gang and some of their ideas. Thanks Quote
surefire Posted August 2, 2003 Posted August 2, 2003 I don't know if it will help with the search engines, but there's no harm, that I know of. With php: $date = date("j/n/Y"); print $date; More info and ways to format the function here: http://www.php.net/manual/en/function.date.php Quote
TCH-Rick Posted August 2, 2003 Posted August 2, 2003 I can't speak to whether it is a good idea or not. As for the how, why bother with a script to do a "touch" like effect when you can just use touch? You can set a cronjob in CPanel and once a day run this command: touch /home/username/public_html/* That will take care of all the files in the public_html directory. You would need to have a similar one for other directories if you wanted to include them. touch /home/username/public_html/otherdir/* etc. Quote
Deverill Posted August 2, 2003 Author Posted August 2, 2003 Perfect! Thanks Rick! Surefire, would a php function such as that make it look like the date-last-modified is today to the web crawlers since it is a dynamic part of a static 3-month-old page? I'm still not sure how these things work but with the help here it's great learning about it! Quote
surefire Posted August 2, 2003 Posted August 2, 2003 The script just displays the date in a predetermined format. I have no idea how the various search engine spiders look at it. Sorry. Quote
Deverill Posted August 2, 2003 Author Posted August 2, 2003 Don't apologize! This is, afterall, the script forum and the question of how has been answered - now it should probably move to the SEO forum to discuss the effect it has on the SEs. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.