OK, I give up. I can't get Clean URLs enabled on my Drupal install on a Godaddy Linux shared hosting account. I'm using:
Drupal 6.4
PHP 5.x
MySQL 5.x
Apache 1.3.33
Drupal is installed in the root, not a subdirectory.
So I altered my .htaccess by uncommenting RewriteBase like this:
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /
Then I added these lines to .htaccess as well:
#php5 in GoDaddy account
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
Then I waited overnight, as I understand that Godaddy caches .htaccess.
But still, clean URLs are disabled.
I just made this install, and don't want to proceed building my site until I know that clean URLs are enable from the getgo, so I'm basically stuck until I can resolve this problem (which apparently numerous people have). Any help is greatly appreciated.
Cheers,
splunge
Comments
Yes, the recurring GoDaddy
Yes, the recurring GoDaddy nightmare, one which has compelled scores of drupal users to switch hosts.
Please try putting this:
At the top of .htaccess
Have you done a google search on the topic?
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.
Thanks
Yes, I've done a google search on the topic, which is how I found the "solutions" I mentioned.
These lines are already at the very top of .htaccess:
#php5 in GoDaddy account
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
I feel your pain. What you
I feel your pain. What you have done should suffice.
If it applies to you, have you tried this?
http://www.sustainableonlinesolutions.com/drupal-clean-url-godaddy
PS: Did you uncomment the second or first Rewrite base in htaccess??
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.
I uncommented
the root (/) RewriteBase, not the subdir (/subdir) RewriteBase, as the latter in not applicable.
I just added that * record in DNS management. I just checked to see if it worked, but no dice. There was a TTL setting, which I set to 1.0 hour.
could you please copy and
could you please copy and paste your .htaccess file here?
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français. / Я могу общаться на русском языке.
sure, here it is
#
# Apache/PHP/Drupal settings:
#
#php5 in GoDaddy account
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
ErrorDocument 404 "The requested file favicon.ico was not found.
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
# 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,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# 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 http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $
Thanks... all I can say is
Thanks... all I can say is that it looks exactly like the .htaccess files that accompany the drupal installs I have done for dozens of users on GoDaddy with clean URLs enabled successfully. I regret I cannot be more helpful. I take it GoDaddy is bereft of any insight?
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français.
hey, thanks
yeah, Godaddy says "not our problem"
Did you try uncommenting the
Did you try uncommenting the base URL line in settings.php? That might do the trick.
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
Je peux communiquer en français.
thanks, I tried that
but no dice, unless it's cached and takes a while to take effect
So many hosts only one GoDaddy
So why not switch... hehehehe. I like Dreamhost.com and it has one click install for drupal, plus I think it works with default htaccess for cleanurls.
"So why not switch?"
um, let's not go that way, OK? ;)
Just came across this thread...
After looking at the .htaccess file you posted, these PHP values should not exist in .htaccess:
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
This is causing the broken functionality.
Regards,
Alicia R.
Go Daddy Hosting
hey, thanks very much Alicia!
I'll try that tomorrow
but what is the implication of these comments that appear before those statements?
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
well, I uncommented those lines last night
and waited until this morning, but Clean URLs are still disabled. Oh well...
Possible solution
This has fixed the problem for at least two or three other people (not including myself) so I am guessing that this your issue. If not.... sorry to get your hopes up:
Go to your CleanURLs admin page and click to run the test. Instead of giving up when you see the error page try adding a "/" at the end of the URL and hit return. You should then by sent right back to your CleanURLs page saying that it will allow you to enable it. At this point you know that without a "/" at the end of your URL your CleanURLs will not work. The reason, or so I've been told, is because Java is for one reason or another requiring the "/" at the end on rewrites. Why? I don't really know. To turn it off go to your GoDaddy web hosting backend and go to "Content > Languages." Change the "JSP/Servlets" to None.
It takes about 24 hours for the change to take effect, but with me it was about 8 hours. It worked for me, if adding the extra slash to the URL manually fixes the problem then I'm pretty sure that turning off Java will fix ya.
thanks for your reply
I want to make sure I understand you. Do you mean add a "/" at the end of this URL, like so?
http://www.mysite.com/?q=admin/settings/clean-urls/
When I do that, I'm taken back to the Clean URLs screen and it's still disabled and I cannot enable it.
Thanks!
The link that you click on
The link that you click on the "enable clean URLs" should take you to the following link:
http://www.mysite.com/admin/settings/clean-urls
I might be wrong here, but that's what I seem to remember at the moment. So you would then add a "/" to the end like this:
http://www.mysite.com/admin/settings/clean-urls/
Were you able to shut off Java on you hosting settings?
Look at this post to get clean urls in Godaddy.
I use Godaddy Shared Hosting also and I was able to enable clean urls. Check out the following topic, http://drupal.org/node/121834 this worked for me. You have to replace the htaccess file in your Drupal 6.x directory with the one in that post. You will then be able to enable clean urls right after you replace the htaccess file.
I'll try that right now
thanks!
you said you could enable Clean URLs "right after." You didn't have to wait a few hours (like, overnight) for the cache to clear?
Clean Urls
No, I didn't have to wait. I am running 4 Drupal sites on my Godaddy Shared Hosting and I did one site at a time and after replacing the htaccess file on each site with the one in the link I posted I went back into my admin panel and was able to enable clean urls. I didn't have to wait. I don't know if I was lucky or what but there was no wait.
hmmm, interesting
well, it's been 15 minutes and still no change
So I think I'll let it sit and think about it overnight
hey, BTW - you didn't comment-out the lines as this Godaddy employee mentioned?
http://drupal.org/node/303225#comment-995019
Godaddy
I didnt change anything in the posted htaccess. I copied it directly as you see it in the post and then saved it as .htaccess text file the using my ftp I moved it over into my drupal site, I then deleted the current htaccess and then renamed the .htaccess text file that I made as the .htaccess I posted below the .htaccess file that im using that enabled me to use clean urls.
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order deny,allow
Deny from all
# Set some options.
Options -Indexes
Options +FollowSymLinks
# Customized error messages.
ErrorDocument 404 /index.php
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 4, Apache 2
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# PHP 5, Apache 1 and 2
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
# Reduce the time dynamically generated pages are cache-able.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
# If your site can be accessed both with and without the prefix www.
# you can use one of the following settings to force user to use only one option:
#
# If you want the site to be accessed WITH the www. only, adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
# RewriteRule .* http://www.example.com/ [L,R=301]
#
# If you want the site to be accessed only WITHOUT the www. , adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
# RewriteRule .* http://example.com/ [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory and
# the rewrite rules are not working properly.
RewriteBase /
# Rewrite old-style URLs of the form 'node.php?id=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^id=([^&]+)$
#RewriteRule node.php index.php?q=node/view/%1 [L]
# Rewrite old-style URLs of the form 'module.php?mod=x'.
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{QUERY_STRING} ^mod=([^&]+)$
#RewriteRule module.php index.php?q=%1 [L]
# Rewrite rules for static page caching provided by the Boost module
# BOOST START
AddCharset utf-8 .html
RewriteCond %{REQUEST_URI} !^/cache
RewriteCond %{REQUEST_URI} !^/user/login
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{HTTP_COOKIE} !DRUPAL_UID
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI} -d
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}/index.html -f
RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1/index.html [L]
RewriteCond %{REQUEST_URI} !^/cache
RewriteCond %{REQUEST_URI} !^/user/login
RewriteCond %{REQUEST_URI} !^/admin
RewriteCond %{HTTP_COOKIE} !DRUPAL_UID
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{DOCUMENT_ROOT}/cache/%{SERVER_NAME}/0/%{REQUEST_URI}.html -f
RewriteRule ^(.*)$ cache/%{SERVER_NAME}/0/$1.html [L]
# BOOST END
# Rewrite current-style URLs of the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: boosted.txt,v 1.4 2006/12/05 10:39:19 arto Exp $
well, I waited overnight
but it still doesn't work. I guess I officially give up now. *sniff*
Sorry it didnt work
Man I sure wished it worked for you. I was in the same boat you was in a couple weeks ago. I had just renewed my godaddy a few days before the clean urls deal came up on me. Godaddy didnt care so I told them I would be looking for another hosting provider. In desperation of not wanting to switch hosting providers because I had been very happy with them up till then. After my forum search on drupal I ran across the post that I linked you to above. I did the htaccess change and it worked great. Dont know why it worked for me and not someone else? Unless it is another issue or possibly the servers they are running our sites on. I actually though that the htaccess file that was on the post was just a way to fool drupal into enabling clean urls. Anyway, wish you the best on fixing your problem whatever you decide to do.
Clean URLS with GoDaddy
Replacing the .htaccess with the one referred to in the post http://drupal.org/node/121834 works fine with GoDaddy Linux hosting (paid version at least for me). However I saw instructions posted that if your site is under a sub-directory (/test) that you should set RewriteBase /test, however it still will not work. But thinking about it since the Drupal 6.6 install is under it's own domain (like test.net) I left RewriteBase as / and I was able to enable clean urls just fine.
Just thought I'd pass that along and I thank everyone who pointed out the solution.
--
Patrick Dunn
I am having the same problem
I just started working on this same problem last night. I'll let you know if I come up with anything before the budget runs out. :)
--
Erik
Did you read my follow up
Did you read my follow up comment?
http://drupal.org/node/303225#comment-1003605
thanks
yes, I tried:
http://www.mysite.com/admin/settings/clean-urls/
I'm not sure what you mean by:
Were you able to shut off Java on you hosting settings?
Since you are on a free
Since you are on a free account that feature may not be available to you. I'm guessing that mod_rewrite is not available to you. Paid versions of GoDaddy do offer this feature.
are you sure you need the added lines?
splunge,
Quick questions --
1) are you sure that you need the added lines in the htaccess file
(you mentioned that you added:
#php5 in GoDaddy account
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
2) do you have "hosting configuration 2.0"?
The reason I ask these two questions is because I am running a Drupal 6 site on GoDaddy with "hosting configuration 2.0", and was able to get clean urls working without adding the additional lines that you mentioned. I just uncommented that one line ( RewriteBase /) in the htaccess file for the Drupal version that I am running. (I didn't copy any htaccess file from the Drupal forums -- I used the one that came with the Drupal install folder, and edited that version.) Also, I didn't have to add any additional lines to the htaccess file -- perhaps because I enabled Hosting configuration 2.0. (You can see which hosting configuration you have on the account summary dashboard of your GoDaddy hosting plan).
Anyway, once I updated the htaccess file I was then able to enable the clean url's within the Drupal site at http://www.yourdomainname.com/admin/settings/clean-urls ). I am running Drupal in a subdirectory, though, so perhaps this would be different for a Drupal install in the root. Just thought I'd share this info in case its at all helpful to you. ou
- Jessica
www.vegaschill.com
My first Druapl site is up in an early beta :-)
hi Jessica
1) I added those lines only after my original .htaccess didn't work, per someone's suggestion
2) yes, I have Hosting configuration 2.0 enabled
thanks for your help
OK on mine
I'm a newbie on Drupal, but just last week I installed Drupal 6.3 via GoDaddy's "Hosting Control Center" to my root directory, then did an immediate upgrade to 6.4, and the "Clean URLs" option was active (and now enabled).
I may need to do that
fortunately I decided not to build much of a site until/unless I could resolve this issue. I didn't know that Godaddy had Drupal as one of their options until after I installed it myself.
could you do me a favor? could you post your .htaccess file here?
thanks
Here it is...
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
Order allow,deny
# Don't show directory listings for URLs which map to a directory.
Options -Indexes
# Follow symbolic links in this directory.
Options +FollowSymLinks
# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php
# Force simple error message for requests for non-existent favicon.ico.
ErrorDocument 404 "The requested file favicon.ico was not found.
# Set the default handler.
DirectoryIndex index.php
# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.
# PHP 4, Apache 1.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 4, Apache 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# PHP 5, Apache 1 and 2.
php_value magic_quotes_gpc 0
php_value register_globals 0
php_value session.auto_start 0
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.encoding_translation 0
# Requires mod_expires to be enabled.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# Do not cache dynamically generated pages.
ExpiresByType text/html A1
# Various rewrite rules.
RewriteEngine on
# 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,
# (http://example.com/... will be redirected to http://www.example.com/...)
# adapt and uncomment the following:
# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment and adapt the following:
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
# 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 http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
# RewriteBase /
# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# $Id: .htaccess,v 1.90.2.1 2008/07/08 09:33:14 goba Exp $
thanks, I just uploaded that to my site
I'll wait overnight for the cache to clear and see if it works. If not, I'm giving up an installing the version Godaddy provides.
Thanks!
[Later...actually, that file makes my site throw a 500 error, so I had to junk it immediately and revert to a previous one. Oh well]
well, it's official, I give up now
I blew away my install and reinstalled using the v6.4 version that Godaddy provides. Still no Clean URLs.
Maybe it's because I'm using a free hosting account (that carries their ads) while I build my site (then start paying when the site is ready to go live). Maybe paying customers get Clean URLs, I dunno.
I give up. Thanks to everyone for your help, hope I can return the favor at some point.
It would seem appropriate
It would seem appropriate for a company to restrict access to certain Apache functions like mod_rewrite, especially if they were giving away web space at no charge. In other words, your situation now makes complete sense.
----------------------------------------------------------------------
http://music.bwv810.com
http://davidhertzberg.com
I am a writer, researcher and solo drupal freelancer.
yeah, maybe I should've mentioned that at the outset
thanks
Clean URLs on GoDaddy Linux shared hosting account
I was easily able to get clean URLs on my GoDaddy shared hosting account, which uses Linux, by "uncommenting," or removing the pound sign, from the third line below in my .htaccess file:
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /
Drupal is installed right into my domain folder. The procedure might be different if Drupal is installed into a subfolder at your domain.
I was in the "can't enable
I was in the "can't enable clean url's on Godaddy" boat up until today. I had tried all the above solutions and none of them worked. Turns out it was because my site site was hosted on their economy hosting plan.
With my site near completion, I wanted to get rid of that annoying ad banner on the top of my site as I put the finishing touches on it, so I upgraded my hosting plan to the so called "deluxe" package.
Coincidentally, the "enable clean urls" was no longer grayed out after I gave Godaddy their lousy six bucks.