Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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!

Posted

The script just displays the date in a predetermined format.

 

I have no idea how the various search engine spiders look at it. Sorry.

Posted

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. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...