Well, the server seems to be behaving ok again. Haven’t seen the symptom again for two days now. Watch it happen again as soon as I post this, or tomorrow. LOL. Anyway, to make my main page more efficient, I am going to keep just including a static text file that contains my blog entries. I’ll only update that file when I actually update my blog.. like right after I make this post. My gallery image is still using the PHP Curl method. I also used to have separate log and counter scripts. I have combined both operations into the counter script in a more efficient way. I realized a better method of getting the actual referer (where a visitor to my webpage came from) which allowed me to get rid of the log script which was being called via an IMG tag. It’s a little tricky when using a framed website because the referer of the “main” page is always the “index” page that sets up all the frames and loads the menu, midi, and main frames. I am also now able to log the search bots as they visit my site. Normally, the search bots would not request my log script that was in an IMG tag. I also now save the count into a session variable so that it only counts a visitor once in a session.
In addition to all that, I have been playing around with Apache’s mod_rewrite and changed how my midi and some other items are handled so that now a normal looking link like http://www.markheadrick.com/midi/d/BeenThnk.mid is redirected to my midi database script for processing and the browser is none the wiser. Works better with search engines as well. Here’s what it looks like:
# BEGIN Midi
RewriteRule ^midi/d/([A-Za-z_0-9\)\(\-]*)\.mid$ php/mididb.php?action=download&id=$1.mid [L]
RewriteRule ^midi/d/([A-Za-z_0-9\)\(\-]*)\.kar$ php/mididb.php?action=download&id=$1.kar [L]
# END Midi
Well, I guess that’s about it as far as website updates go.
Oh yeah, if you haven’t seen it, go see Bourne Ultimatum! That movie rocks!!!