What can I say? This post is really a blatant attempt to help the search-engine page rank of the portrait studio my wife works for. I’m shameless.
On the other hand, it is a site that I developed (along with my wife’s design skills), and, coming during a time when I’ve not been able to do a lot of experimentation with my programming, this was a welcome project. Let me explain a little bit about the workings underneath the hood, so to speak.
First of all, I took this opportunity to learn and explore Apache’s mod_rewrite. I wanted to use mod_rewrite for several reasons, one of which was to create search-engine-friendly URLs to help boost their page rank. Another was because I wanted all data files to reside outside the Web root as include (
.inc) files. The PHP logic behind the site calls the specified file; mod_rewrite allows this to appear as though there’s a logical directory structure, which there isn’t—all the data files reside in one directory.
For example, take this URL:
It’s really being rewritten for the application to:
Anyone who already knows mod_rewrite is probably saying, “Gee, Ben, this is all so elementary.” I agree, but it’s not something I’ve had the luxury of playing with for a while.
Another reason I chose this particular structure (with the data files residing in a directory of their own and outside of the Web root) was to allow for a flexible, template-driven site that is easy to update and even add pages—without some sort of CMS.
In all, creating the Carney Studio Web site was an enjoyable experience; I had a lot of fun with it—and I don’t mind promoting it one bit, even it is to help improve its page rank. ;-)