By JonGirard-1 on
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!
Thanks,
Jon
Comments
Look at this
This may help
http://drupal.org/node/165761
hmm.. still didn't help. I
hmm.. still didn't help. I did exactly as it said, but still nothing.
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..HAS ANYONE ON BLUEHOST GOTTEN THIS TO WORK?
Worked for 6.x
The solutions suggested by the folks here http://drupal.org/node/165761 (namely changing the RewriteBase directive to '/') worked for 6.3 on bluehost.
I contacted Bluehost.. Of
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/5.0.2.2635 Server at courtenaystory.com Port 80
Jon.
I used rewrite mod in httpd.conf
I used rewrite mod in httpd.conf but, It don't work in my localhost
I have installed over 20
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!
Ah, that might be where I'm
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!
Jon.
drupal does come with a
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
I'm on Bluehost and this is working.
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.
Regards,
Anthony
Phew.. Maybe this wasn't so
Phew.. Maybe this wasn't so hard afterall XD
Works great everyone.. thanks.
Jon.
6.4 - just rename htaccess file
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
clean urls bluehost nightmare
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
sorted
had to do both in the web root and the site root - sweet!!!
onto the next challenge!
Still stuck after trying all your suggestions
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 sb.example.com. 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?
In your .htaccess file, try
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.
I'm on 6.15 and this worked
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.
Woot This worked for D7!
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 "www.mysite.com/node/2 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
http://www.creocoding.com
Facebook - Facebook.com/CreoCoding
LinkedIn - http://lnkd.in/rQrdS7
Still stuck - Tried everything!
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.
Thanks,
RPK
Try the easiest fix
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
http://example.com/,# uncomment the following line:
# RewriteBase /
Uncomment (delete the #) RewriteBase /
Best of luck to you!
Clean URLs on Bluehost
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. http://www.example.com/~username/drupal/ and not http://www.example.com), the typical comments on uncommenting the "RewriteBase /" didn't work.
What did work for me was uncommenting this portion:
and changing it to read as follows (since I was running it from a http://box123.bluehost.com/~username/drupal)
Once that was done the enable clean URLs checkbox immediately appeared. Perhaps this might work for you too.
This is exactly the situation
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 box123.bluehost.com/~username (which maps to your public_html directory, which is symlinked to the www directory as well).
Thanks!
Drupal 7.15 clean urls bluehost
thank you very much.....
Hours looking for clean urls at bluehost.....
RewriteBase / does not work
RewriteBase /~username is perfect.
Drupal 7.15 @ bluehost
-------
edited:
When DNS reply at you site: revert change to RewriteBase /
Works for Me
This worked for me! Thanks!
www.sheldonkreger.com
Worked for me
Worked for me as well, Thank you!
Thank you, just like the rest
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
then further down uncommented 'RewriteBase /' and added ~username (excluded/drupal) as per below:
Did this in both .htaccess files in the public_html and www. directories (just to be sure!)
clean URLs
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.
Same Problem with Clean URL's and Bluehost
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...
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.
What I did for hostmonster to make it work
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
Hi, here's how I configured
Hi, here's how I configured my bluehost drupal site for clean urls
scenario:
- non-drupal site on
/public_html- drupal 6.2 on
/public_html/drupalinstalled using simplescripts, single php.ini configured/usedconfig:
- in folder
/public_html/drupal, rename .htaccess.txt to .htaccess- edit .htaccess to uncomment
RewriteBase /snapshot of
/public_html/drupal/.htaccessHope this helps.
Thanks so much
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.
kudos
I don't like any site where I don't have admin menu
domain association with new hosting account
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.phpI done follow you but
I done follow you but .htaccess no create in my site
Success with Bluehost
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!
Go to
I think you should go to http://www.siteground.com/tutorials/drupal-tutorial/drupal_sef.htm
although it has solution for 7.x but I am sure it will work 4 u also.
I had the clean URLs test
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
RewriteBase setting after upload of full .htaccess file
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)
-D