2008-07-10 Drupal Clean URLs In Bluehost.

I've started to use an economy web host - Bluehost.Com. The only thing is that for Drupal, clean urls can't be turned on automatically. Posting the solution here for people looking to solve this issue.

If you have multiple sites on Bluehost, go to the directory one of your Drupal web sites is on.

For instance, I am working on a site called conshohockenrecycling so I went to the main directory for this site

cd ~/www/conshockenrecycling

I used an editor called vi to create a .htaccess file. I pasted this in it.

RewriteEngine on
RewriteBase /public_html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

I go to the Administer -> Clean URLs

You can now enable clean urls.

I had a .htaccess in the ~/www directory but this did not do the trick. The .htaccess file had to be done in the actual website directory.