Enabling Clean URLs in Drupal 5
Today I am going to show you how to enable clean URL's in Drupal. By enabling clean URLs, your Drupal website will become a lot more search engine friendly and the URL's in your browser will be easy to read.
So what do I mean by clean URLs? I'll pull it straight from Drupal's Handbook:
By default, Drupal passes path arguments to itself via its internally generated URLs. This results in URLs that look like the following: "http://www.example.com/?q=node/83." This can make URLs hard to read and it also stops many search engines, like Google, from indexing the pages with these URLs.
You can tell Drupal to use "clean URLs", eliminating the "?q=" in internal URLs. Note that this works only for Apache servers which have the LoadModule rewrite_module configured and mod_rewrite enabled in httpd.conf configuration file.
So how do you enable this feature? Well hopefully you have your site on an Apache server. Most Apache web-servers have a module installed called rewrite_module, as mentioned above. If you are on a Windows server, you might want to ask if you can switch to an apache server. I had to do this for one of my sites and it made everything easier.
Luckily, Drupal will run a test to see if this is enabled on your web-server. Just go to Site Configuration and click on the menu called Clean URLs. You will see that this option is grayed out. What you have to do next is run the clean URL test. The link for this is at the end of the paragraph on this page. Just click on the link and hopefully you will be brought back to this same page, but this time the Clean URLs Enabled button is selectable. If it is, just click on Save Configuration and you are done. No more ?q=xxx!
If you can't click on it because it is still grayed out, you need to call your server administrator.
Drupal has more information on this in there handbook if you are interested.


Delicious
Digg
StumbleUpon
Technorati