07.14
Clean URLs are URL rewriting rules that allow you to create SEO-friendly static pathnames for Drupal nodes, eliminating the “?q=” part of the path that can prevent web robots from properly indexing your content. Even with GoDaddy’s time-saving “one-click” install, the Clean URLs administrative page (administer >> site configuration >> clean urls) tells you that this functionality is not supported. This message is just plain wrong – the server configuration that Clean URLs depends on (namely, enabling the Apache module mod_rewrite) is already done for you, yet the radio buttons are disabled (greyed out) on the page. Here’s a workaround that will get this feature working (tested in Drupal 6.x):
Note this requires a Linux web host. IIS needs the ISAPI equivalent of Apache mod_rewrite functionality (a .dll file that needs to be present in the system path), but I favor LAMP hosting or pre-built Windows stacks (Bitnami and Acquia Drupal stacks are both good choices). If your site(s) are hosted on GoDaddy, I believe that they can and will change your hosting option back to Linux after you’ve already selected Windows/IIS as your hosting platform.
- Edit the file .htaccess to uncomment (remove # in front of) the rule:
RewriteBase /or add the correct path if Drupal is in a subdirectory. - Log in to Drupal as the admin (user 1).
- While logged in, enter in the address bar “http://www.yoursite.com/admin/settings/clean-urls”.
- Toggle the radio button, which is now remarkably enabled, to turn on Clean URLs.
- You’re done! Everything should work as expected.
I don’t know what made me think of this hack, since it is both illogical and unintuitive (wouldn’t you first need to turn on Clean URLs in order to use them?), but I’m really glad that I did!
Thanks for posting, but i didn’t have any luck. :-(
Hi Sean, if you’re hosted on GoDaddy with a linux hosting package this should work, could you paste me the contents of your .htaccess file? Which step can you get to successfully?
I have seen drupal friendly urls work if you’re using the main domain for the hosting account, but something messes it up when you use their virtual server set up. I’m going to install drupal 7 on a new subdomain and see what happens.
Hi everyone.
About a year-and-a-half ago I posted a small screencast demonstrating how to do this if you want to check it out (but please keep in mind I was a very young Drupaler at the time…) ;) http://www.desynes.com/resources/how-to/enable-clean-urls-drupal-godaddy
Thanks for posting this Jeremy, hopefully that will help somebody out. Also, the .htaccess file might be “hidden” by your FTP client, if you don’t see it in your Drupal base directory, make sure dot-files are being shown. I didn’t think of that earlier, but for folks on Mac or just getting started with Linux might not know about that as well.