the truth, the whole truth, the knock you on your butt truth...

Saturday, January 13, 2007

drupal subfolder help

Lots of business and community sites are being developed using Content Management Systems these days, and I have found that Drupal is one of my favorites. As a web designer, I once held the belief that CMS applications were a waste of time and that you were limited to blocky cookie-cutter designs. When I first started using them, simple layout twaks seemed to take forever. However, over the last year or so, I have grown to appreciate the hard work and community efforts that have gone into making apps like Drupal so robust. While basic layout changes may take longer, the amount of time saved for the database interaction skills of drupal is colossal.

Unfortunately, I haven't found any CMS app on the market that is actually *easy* to configure, but for the most part they are easy to use. If you want them to look unique and get away from generic bloggy-looking templates, you're going to have to do some digging and get your hands dirty.

My initial approach was to blow away most of the inherent CSS and rewrite the code so that I had a good grasp on what all of the various tables and cells were named. However, this proved to be a daunting unraveling process and I found that I was wasting a bunch of time trying to reinvent the wheel. Lately, my efforts have instead fallen somewhere in the middle, when it comes to the layout of my Drupal-based sites. I tweak it as needed, but try to keep most of the source code intact. This proves useful for finding quicker answers to technical questions on the drupal homepage, and it also makes upgrades a little less nerve-racking.

One common feature that can be a headache in Drupal is when you are deciding to setup your installation in a subfolder on a domain, and have another domain name that you want to point to it. The first thing to do is to setup your DNS nameservers with the registrar of the parked domain. Then, you go into your control panel at your hosting company and setup an "add-on" domain for the parked name to be pointed at the subfolder. From there, it gets a little tricky. Drupal has this nasty login bug that often makes users login twice - once for the domain with the WWW prefix, and again for the domain without the WWW prefix. So, I go into the htaccess file and uncomment the rule that forces all WWW inputs to be rerouted to the domain without the WWW. And the last step of the rerouting (which I usually forget) is to go into the settings.php file in the drupal installation "sites" subfolder, and set the default URL to your new domain that will be pointed to your subfolder install. From there, it should work well.

If not, you may want to search the drupal.org resource base, as there are a few other Rewrite rules that you can fiddle around with in your htaccess file.

Good luck with your drupal installation and configuration. I hope that this helps some of you, as it was a common problem for many of my drupal installs, and I couldn't find these easy steps detailed anywhere in logical sequence.

Labels: ,

0 Comments:

Post a Comment

<< Home