So, I have installed drupal on bluehost, everythings running smoothly. The only problem is, I've been trying for hours to get clean urls working, and nothing seems to do the trick.

Bluehost already has the apache2 rewrite_mod installed, so I simply added these lines to my .htaccess file

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

Then upon going to run the clean-urls test, i get the error, page not found, which indicates that clean urls still aren't working.
I've searched all over, no-one gives a straight answer!




pcambra’s picture

JonGirard’s picture

hmm.. still didn't help. I did exactly as it said, but still nothing.

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  #Added to keep from getting 500 errors at 1&1 w/ Clean URLs enabled
  RewriteBase /

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  # To redirect all users to access the site WITH the 'www.' prefix,
  # ( will be redirected to
  # adapt and uncomment the following:
   RewriteCond %{HTTP_HOST} ^courtenaystory\.com$ [NC]
   RewriteRule ^(.*)$$1 [L,R=301]

I'm thinking it could be because of the RewriteBase/ directory setting perhaps, but i've tries setting it to every imaginable directory w/ still no luck..


failedvagabond’s picture

The solutions suggested by the folks here (namely changing the RewriteBase directive to '/') worked for 6.3 on bluehost.

JonGirard’s picture

I contacted Bluehost.. Of course they have no idea what is going on, but they did say that the Apache Rewrite_ Mod IS enabled on Bluehost by default..

It must be the code I'm using in that case.. but still, no one has an answer for me.

Everyone keeps going on about "the rewrite lines should already be in .htaccess?" well, in my public_html level .htaccess, it's all blank, nothing. I have to add all the lines myself.

Is there someway to actually check if the Apache Rewrite_ Mod is actually enabled, perhaps Bluehost was mistaken because upon running the clean urls test, it takes me to the "error 404 page" where at the bottom it displays server information, in which I do not see "rewrite_mod"- Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ Server at Port 80


formoney191’s picture

I used rewrite mod in httpd.conf but, It don't work in my localhost

westwesterson’s picture

I have installed over 20 sites on bluehost servers, and aside from a missing .htaccess have had no problems with using bluehost with cleanurls. Double check that the .htaccess file is in the base drupal directory, i have run into this on a number of occasions, this typically happens when uploading files from a mac, or linux system.

Hope this helps!

JonGirard’s picture

Ah, that might be where I'm going wrong then.. I created a .htaccess file (which I'm uploading from a mac) and uploaded it into the web root ("public_html") where my drupal folders and files are.

Is that the correct location? And does drupal come with it's own .htaccess file (I never saw one- could be because I'm on a mac?)

Thanks for your response! I feel like I'm getting close to solving this from the help from people like you!


westwesterson’s picture

drupal does come with a .htaccess file. You just cannot view it on your mac because files starting with a '.' are considered hidden. A trick is to open it in some program that lets you view hidden files on a mac such as text wrangler, save it as htaccess, upload it to the base directory, and then rename it to .htaccess . Without the .htaccess file clean urls doesn't work :-p

acgarcia21’s picture

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.


JonGirard’s picture

Phew.. Maybe this wasn't so hard afterall XD

Works great everyone.. thanks.


citronica’s picture

I'm hosting multiple sites on a single Bluehost account, and this was all I had to do to get Clean URLs working:

1. Find htaccess.txt in my Drupal site directory.

2. Open the file, and uncomment the line that says RewriteBase /

3. Save the file, and then rename it to .htaccess

cazam’s picture

Pretty please can anyone help. I've followed all these threads and tried all the suggestions to no avail.
Bluehost assure that the mod-rewite is enabled.
I use drupal 6.2
and no matter which of these codes I add to the htaacess and wether its the one in the root, or the one in the site (which is an add on domain and thus not in the root) I do not ever get the chan=ce to enable clean urls.
Going bonkers. Keep getting the error:
Your system configuration does not currently support this feature

Pretty please can anyone help???

cazam’s picture

had to do both in the web root and the site root - sweet!!!
onto the next challenge!

tootsietorres’s picture

I'm on Bluehost. I have an installation of Drupal in my main public_html directory. I changed the .htaccess file and I have clean URLs enabled for that site. I have a totally different site, with different modules, etc, and its own installation of Drupal at I have tried changing the .htaccess file inside public_html/sb. I have tried every combo of RewriteBase that I can think of.

Any suggestions?

cmejo’s picture

In your .htaccess file, try

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

You'll notice I edited the previous "RewriteBase /public_html" line.

Drupal Architect and CEO, Cronode

TrickerTreater’s picture

I'm on 6.15 and this worked for me. I literally just c&p'd it into my .htaccess via dreamweaver. Big thanks. Now my Galleria works with my Imagecache.

TravisJohnston’s picture

Thanks I was just going back and forth with support. I knew all hope was lost when he said this

Bluehost Support: " I'm seeing links going nowhere anyways, i think this is a coding issue."

Me: "? which one"

Bluehost Support " and there is no node folder"

Me: "............. heh yeah duh... its in the db."

Thank you kindly,

Travis Johnston

Creo Coding - Let's Start Our Journey!
Owner and Web Developer

Facebook -
LinkedIn -

rpk’s picture

I'm trying to get clean URLs to work on Bluehost and can safely say I tried every possible suggested solution I could find.

I would appreciate if someone could send an .htaccess script for Clean URLs on Bluehost.


Jason Dugan’s picture

I had the same trouble on Bluehost. Got clean URLs working by simply uncommenting RewriteBase / in the .htaccess file. Make sure to put it in your root directory (/public_html).

Look for this block of code in .htaccess:
# If your site is running in a VirtualDocumentRoot at,
# uncomment the following line:
# RewriteBase /

Uncomment (delete the #) RewriteBase /

Best of luck to you!

Donn’s picture

I was having this same problem too until I uncommented the portion of the RewriteBase. More specifically, as I was running Drupal in a folder and not in the main directory (e.g. and not, the typical comments on uncommenting the "RewriteBase /" didn't work.

What did work for me was uncommenting this portion:

# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at uncomment and
# modify the following line:

and changing it to read as follows (since I was running it from a

RewriteBase /~username/drupal/

Once that was done the enable clean URLs checkbox immediately appeared. Perhaps this might work for you too.

adamskinner’s picture

This is exactly the situation I'm in, and making this change did the trick for me. I've got my stuff in the ~username/public_html directory on BlueHost, so my RewriteBase was just ~username.

My situation is that I'm migrating a static website on a different host to BlueHost and Drupal, but since the DNS records can't be updated until the site is complete, I'm working off of (which maps to your public_html directory, which is symlinked to the www directory as well).


stefmex’s picture

thank you very much.....

Hours looking for clean urls at bluehost.....

RewriteBase / does not work

RewriteBase /~username is perfect.

Drupal 7.15 @ bluehost


When DNS reply at you site: revert change to RewriteBase /

sheldonkreger’s picture

This worked for me! Thanks!

bnishii’s picture

Worked for me as well, Thank you!

kerrycurtain’s picture

Thank you, just like the rest of us I too have spent many trial and error hours. Finally a combo to the above posts worked. End result...

In the first part of the .htaccess file

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /~username
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

then further down uncommented 'RewriteBase /' and added ~username (excluded/drupal) as per below:

#Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  #VirtualDocumentRoot and the rewrite rules are not working properly.
  #For example if your site is at uncomment and
  #modify the following line:
  RewriteBase /~username

Did this in both .htaccess files in the public_html and www. directories (just to be sure!)

dsellers’s picture

If you are on 7.0 trying to enable Clean URL's using Bluehosts click to install utility, you may need to upload a fresh copy of the .htaccess from a default drupal download. I was having problems and found that the default.htaccess was a blank file. I will say that the initial install was way easier that on godaddy. so far i like.

titusbass’s picture

I have a main Domain, and an Add-on Domain both using Drupal 6.2. I have a .htaccess file in my public_html folder for my main domain, but when I looked at it, all that was in the file was this...

# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php

So I opened the .htaccess on my localhost (I'm on a MAC 10.4.11 using MAMP, and have no problems using clean URLS on my Local host) and followed Jason Dugan's post "Try the easiest fix" by
Uncomment (delete the #) RewriteBase /

Then I uploaded the file and I got a 500 Error.

The odd thing is, when I looked into the directory for my Add-on domain, there isn't a .htaccess file in the directory. When I did the same uncomment steps, then uploaded the .htaccess file, I also got a 500 error.

So I don't know what the deal is. Very perplexing and frustrating indeed.

jagmeister’s picture

I had a .htaccess file which only had
"# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php"
and a .htaccess.txt file with a lot more info.
I opended the .htaccess.txt file and paste the quoted info above in the .htaccess just below the line that says
"# Apache/PHP/Drupal settings:"
then i uncommented RewriteBase /
after saving I deleted the .htaccess file and renamed the .htacess.txt to .htaccess

EdCazini’s picture

Hi, here's how I configured my bluehost drupal site for clean urls
- non-drupal site on /public_html
- drupal 6.2 on /public_html/drupal installed using simplescripts, single php.ini configured/used

- in folder /public_html/drupal, rename .htaccess.txt to .htaccess
- edit .htaccess to uncomment RewriteBase /

snapshot of /public_html/drupal/.htaccess

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /

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

Hope this helps.

BeWhy’s picture

I just wanted to say thank you so much for putting in that whole code block. Earlier posters might have had success in the context of a code block like that, but I didn't have that.

I wish more folk like you would paste a couple lines before and after because it's not just the one line that fixes it, it's the lines working together.


I don't like any site where I don't have admin menu

rajmataj’s picture

Note that you will experience issues with Clean URLs if you new hosting setup does not yet have a domain associated with it. For example, if you can only access your site from 123.234.345.456/~mysite then Clean URLs will not likely work until you have a domain pointing at your server.

You could try to work around this by setting your .htaccess to 123.234.345.456/~mysite, as an example, and also the $base_urlsetting the settings.php

formoney191’s picture

I done follow you but .htaccess no create in my site

thomast8991’s picture

I was able to get this enabled and the fix was simple. I found the .htaccess file in my Drupal sub-directory. It was named htaccess.txt . Simply copying it and renaming it to .htaccess was the fix. Pretty easy!

anujblog’s picture

I think you should go to
although it has solution for 7.x but I am sure it will work 4 u also.

HTDrupalUser’s picture

I had the clean URLs test fail too. The way I fixed it was when I noticed my .htaccess file in public_html was zero bytes after the Drupal installation.

So, I opened the Drurpal 7.17 zip file and copied a fresh .htaccess file to the public_html directory (which is about 5 KB as I recall).

Problem solved.

Clean URL test passed fine after that.

Hope this helps...

- m

rentedname’s picture

Thank you, good suggestion and it worked for my BlueHost site as well, both for main and subdomain.

One issue I ran into was how to manage the RewriteBase setting for the subdomain site. You will see a lot of recommendations to add the name for your subdomain site folder (or username) after the RewriteBase statement, like this:

"RewriteBase /subdomainfoldername"

However, I got my subdomain site to work correctly, along with enabling of clean URLs, by treating the subdomain Rewrite command as if the folder were actually the main domain, to wit:

"RewriteBase /"

And then everything worked fine, and clean URLs become enabled.

To those struggling with this issue: have courage, stick with it, and within hours you will solve your problem! (grin)