Drupal Clean URLs


Well I’m continuing work on the new drupal site…at a snail’s pace…LOL. Anywho, I got my Drupal install completed a little over 2 months ago and I’ve let it sit on my server for awhile. Part of the reason it has sat so long is because I’ve been really busy and the other part is that I really did want to get the installation in place and then sit back and wait to see if any errors popped up along the way.

Fortunately, no errors popped up and I now have time to get more work done on the site. As a result, I’ve setup the clean urls feature of Drupal. I simply enabled the clean url module and the path module to enable the pretty url you see in your address bar. I did have one problem where I was not initially able to set the radio button to enable the clean urls. I did some research and my .htaccess file was not correct. For some reason that particular file was completely blank. Evidently when I installed Drupal that file did not copy over correctly for whatever reason. So, I went to the Drupal site and found the following link (http://drupal.org/node/15365) for the clean urls info. Further down that page there was a link to the .htaccess info (http://cvs.drupal.org/viewvc.py/drupal/drupal/.htaccess?view=markup)

I copied and pasted the information from the .htaccess page into my own .htaccess file and the uploaded my file to the server. Guess what? I was able to enable my clean url module in the admin panel.

After getting that cleared up, I enabled the path module so I could actually write meaningful titles. Clean urls removed the question mark and equal sign from the url, but it still gave it the generic node/1 as a url. The path module, once enabled, gives you the functionality to rename your urls to whatever you like.

While that was all well and good; I wanted something more dynamic or automatic. That is where the pathauto module comes into play. The pathauto module is not one of the modules that automatically came with my particular install of Drupal so I had to go download it, upload/install it, and then enable it via the admin panel. Once enabled and configured, it spits out the clean urls that you see automatically.

Pretty sweet!

Well, that is the latest update so far. I’ll keep you posted as I chug along on the site makeover. Look for updated navigation and the actual content pages very soon.