Saturday, April 28, 2007

here's another quick one.. I posted my blog update, for the first time since I had to get a new shell account, and move all my content, and I found that my blog hadn't updated.

It turns out I used to have an index.html symlink to the real html file that blogger updates, but in the process of downloading and uploading all my content, that symlink got turned into a normal file.

I then had to work out how to create a symlink with cpanel, the software I have to use on my hosting now, because it doesn't provide shell access (very annoying).

Anyway, in the end, I found that I had to create a cron job to create the symlink, and then just delete it.

I found details of it here:


Create symlink without SSH

A trick I used on a site with cpanel is to create the symlink using the cron function (its clunky, but it works).

In cpanel, you go to the cron jobs page and schedule your command to run pretty much right away. For example if your main site is www.site.com and you want a second site www.site.com/foo then the symlink can be created using something like:

ln -s /full_path_to_html_dir/ /full_path_to_html_dir/foo

PS: Don't forget to remove your cron entry after it has run, or it will keep doing it!

0 Comments:

Post a Comment

<< Home