Almost any developer knows that search engine placement is
critical to the success of a web site. What many people don't
know is that a lot of search engines cannot index many database-driven
pages (basically any page with a '?' or '&' in the URL).
So when I set about building gotoCity.com, one
of my goals was to make the site database-driven, but still indexable. I didn't want
to top it all off. That meant the look-and-feel of the site had to be dependent
on which "affiliate" site was being accessed (gotoCity.com is just one incarnation of the
To pull this off, I started with a subtle Apache feature that can "force" a
script to be called for any certain directory tree. In my case, I wanted all
URLs that fall under "/local/" to call a script. This would be MUCH easier
than creating 200,000 localized, co-branded web pages and a genuine directory
structure to match it.
So in Apache's
access.conf file, I added the following lines: