Paid affiliate advertisement
Get Clean URLs working on GoDaddy
drupalancers - August 21, 2007 - 19:04
We're looking for a .htaccess expert to help us to gget Clean URLs working on a GoDaddy server.
We're looking for a .htaccess expert to help us to gget Clean URLs working on a GoDaddy server.
I don't think you need a
I don't think you need a .htaccess expert. All the code for .htaccess you need is shipped with Drupal and can be found at yourdrupalinstallation/.htaccess.
I think you should contact GoDaddy. They are probably not allowing you to do certain stuff and that's why clean URLs is not working there.
José San Martin
http://www.verinco.com/
just uncomment RewriteBase /
I have the deluxe hosting with my second domain in a sub directory. When I ran the install for the sub directory site I was surprised to see that clean urls wouldn't be enabled, as they worked fine on the main site.
All I did was download the .htaccess file from the sub directory, opened it and uncommendted 'RewriteBase /' which is right near the bottom. 5 minutes later I was able to set clean urls.
Godaddy not the right choice
I'd say its better to switch now to some other host. I'd recommend Rackspace or Hurricane Electric.
--
Roshan Shah
http://www.bpocanada.com
'Drupal and Ruby on Rails Specialists'
Vancouver, Canada
Skype/GoogleTalk/Yahoo : bpocanada
Works fine for me
Works fine for me out-of-the-box.
Ex:
http://rescubuntu.info/
I use the default drupal .htaccess and add the two lines for GoDaddy to use php5
#php5 in GoDaddy account
AddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
See also:
http://help.godaddy.com/article.php?article_id=1082&prog_id=GoDaddy&isc=...
NOTE: This content only applies to our Linux shared hosting accounts running Hosting Configuration 2.0. You can view the current configuration of your hosting under the Account Summary section of the Hosting Control Center in your customer account. See How do I upgrade my hosting account to run Hosting Configuration 2.0? for more information.
Godaddy Dedicated server
Oops.. Sorry.. my comments were for godaddy dedicated server.
--
Roshan Shah
T : 604-630-4292
Vancouver, Canada
Skype/GoogleTalk/Yahoo : bpocanada
Godaddy Settings that make it work
In Hosting Center:
1. Enable PHP 5 (since this has mbstring enabled by default in godaddy)
Select Content Tab ->Add on Languages and then enable php 5
2. Update php File Extensions to work with php 5
Select Settings Tab -> File Extensions and click edit on .php files
Now refresh the drupal status admin page and Unicode Library Warning should go away
I recently installed mine on
I recently installed mine on godaddy. and i experienced the same problems with clean URL when installing it in a sub dir but manged to fix it modifying the .htaccess but if you have it installed in the root it should work fine. let me know whats the problem and ill try to help you out.
__________________________________________________________________________________
My Open Source Drupal site for an Open source Image editing software http://gimp-tutorials.net
Last week I installed Drupal
Last week I installed Drupal on Godaddy in a multi site environment and I don'd had any problem with clean urls.
I have all drupal files in root directory.
Jim
VoIP Reviews
I'm having trouble with
I'm having trouble with this.
http://drupal.org/node/185239#comment-284209
1. Can't seem to get a domain pointed at the drupal folder
2. Can't seem to get multisite working properly
Are there any threads or experiences you can share?
mod rewrite issues with drupal 6 in subdirectory on GoDaddy
Hi solidnuts, you posted this a long time ago but I hope your offer to help with .htaccess issues is still available.
In summary, I need my files to appear in the root, i.e. www.eco-rally.org/about (without /Drupal/)
What follows is a detailed account of my setup and my attempts thus far.
For ease of maintenance I got GoDaddy to install all drupal v6.1 files into a sub dir called Drupal using
Godaddy Hosting Connection 2. They hooked it up to the database. I have not yet upgraded from 6.1.
I have a Deluxe virtual dedicated server account on Linux using one MySQL d'base and PHP 5.
I also have a virtual subdomain: http://eco-rally.org (without the www. prefix) in order to display non-drupal pages. Could this be causing the problem?
Non-core files, modules, themes etc. are located in http://www.eco-rally.org/Drupal/sites/all/
I'm using the PathAuto module and URLs are 'clean'.
The Problem:
I have tried many different rewrite rules to make Drupal appear in the root but each set of rules has it's own problems. The following rules without the preceeding hash sign are semi-working,
If I type in www.eco-rally.org/index.php the rewrite rule do the job
If I clicked on a link to the homepage, however, I am directed to
www.eco-rally.org/Drupal/index.php.
The Solution?
The following code is the .htaccess file in the public_html root.
As you can see, I have tried lots of rewrite rules suggested on other forum posts on this topic - but to no avail.
All rules preceeded by a leading hash are included purely as a reference of what I have already tried
Options -Indexes
RewriteEngine on
Options +FollowSymLinks
# script 1
RewriteCond %{REQUEST_URI} !^/sites.*
RewriteCond %{REQUEST_URI} !^/Drupal.*
RewriteRule ^/(.*)$ /Drupal/$1 [L]
# RewriteCond %{HTTP_HOST} !^www\.eco-rally\.org$ [NC]
# RewriteCond %{REQUEST_URI} !^/Drupal
# Alt script 3 (from Drupal forum)
# site
# RewriteCond %{HTTP_HOST} !^www\.eco-rally\.org$ [NC]
# RewriteCond %{REQUEST_URI} !^/Drupal
# RewriteRule ^$ /Drupal/index.php [L]
# files
RewriteCond %{REQUEST_URI} ^.*\.(jpg|jpeg|gif|png|css|js|pl|txt|swf)$
RewriteCond %{REQUEST_URI} !^/Drupal/ RewriteRule ^(.*)$ /Drupal/$1 [L,QSA]
# url 's
RewriteCond %{HTTP_HOST} ^www\.eco-rally\.org$ [NC]
RewriteRule ^(.*)$ /Drupal/index.php?q=$1 [L,QSA]
# Alternative script 4 (from Drupal forum)
# RewriteRule .* http://www.eco-rally.org/ [L,R=301]
# RewriteRule ^$ Drupal/index.php [L]
# RewriteCond %{DOCUMENT_ROOT}/Drupal%{REQUEST_URI} -f
# RewriteRule .* Drupal/$0 [L]
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule .* Drupal/index.php?q=$0 [QSA]
# RewriteCond %{REQUEST_URI} !^.*\.css.*$ [NC]
My web-host (godaddy.com) confirmed that the rewrite rules look incorrect but are NOT prepared to tell me how to rectify them.
There .htaccess file in the Drupal folder is as follows:
# Various rewrite rules.<IfModule mod_rewrite.c>
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} ^eco-rally\.org$ [NC]
# RewriteRule ^(.*)$ http://www.eco-rally.org/$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:
<strong>RewriteBase /Drupal</strong>
#
# 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]
</IfModule>
The relevant section of /Drupal/sites/default/settings.php is as follows:
* Base URL (optional).*
* If you are experiencing issues with different site domains,
* uncomment the Base URL statement below (remove the leading hash sign)
* and fill in the URL to your Drupal installation.
*
* You might also want to force users to use a given domain.
* See the .htaccess file for more information.
*
* Examples:
* $base_url = 'http://www.example.com';
* $base_url = 'http://www.example.com:8888';
* $base_url = 'http://www.example.com/drupal';
* $base_url = 'https://www.example.com:8888/drupal';
*
* It is not allowed to have a trailing slash; Drupal will add it
* for you.
*/
# $base_url = 'http://www.example.com/drupal'; // NO trailing slash!
<strong>$base_url = 'http://www.eco-rally.org/Drupal';</strong>
Any help would be greatly appreciated!
Mike
www.eco-rally.org
Funny, yesterday, I was
Funny, yesterday, I was helping install a Wordpress site on godaddy for a friend and was having the same problem. Wordpress uses the term "Permalinks" for "Clean URLs" but both are based on mod_rewrite.
I came accross this in google:
http://www.joshstauffer.com/2007/04/wordpress-godaddy-permalinks-and-404s/
The advice there was to wait a while and it will start working. So I did. Yesterday afternoon it was not working and now this morning it is.
I don't want to pretend to know anything about how this works, and the post I noted above provides only some conjecture about server updates. So take if for what it is, but you might want to give the "wait a while" approach a try.
Clean URLs on godaddy subfolder
One of my clients faced a similar problem. He was hosting multiple domains on the same godaddy deluxe hosting package.
This .htaccess file enables clean-urls in such settings. It even works with subfolders and subdomains as well.
Download Link:
http://208.109.209.180/godaddy_htaccess.zip
Instructions:
Replace the .htaccess file which came with drupal.
Find the following line in the .htaccess file:
" RewriteBase /sitecontent"
and change the word "sitecontent" to the correct subfolder name/path where you have installed the drupal on your godaddy server
feel free to email me, if you get stuck somewhere.
Regards,
Amit
Email: drupalexpertamit@gmail.com
I tried this and enabled
I tried this and enabled clean URLs. Didn't seem to help. Good news is, it looks like bryansbusiness.com can log into the default site now - just took a little time to go into effect. Perhaps this is the case with the .htaccess file? I'm trying to access a sub-site called "test" and it doesn't work - get "page not found" off the default site.
more details
If you put the above .htaccess in a subfolder called "test" (change the "/sitecontent" to "/test").
Then it will work, if you access the site from "http://example.com/test/"
But if you are accessing the same folder from "http://test.example.com/" as a subdomain, then it wont work. Change the "/sitecontent" to "/", if accessing from a subdomain URL.
The above file enables Clean URLs in almost all configurations if used correctly.
Regards,
Amit
Email: drupalexpertamit@gmail.com
So, I've got the following
So, I've got the following in my root folder:
./drupal
./drupal/.htaccess <-- your file with "/sitecontent" changed to "/drupal"
./drupal/sites/test
Accessing the default site from www.bryansbiz.com/drupal works fine. Accessing my test multisite from www.bryansbiz.com/drupal/test doesn't work at all (I get a page not found from the default site).
So, I thought the extra folder in the URL was npt making drupal happy. I created a subdomain: http://drupal.bryansbiz.com, but still no dice accessing the test multisite.
PLEASE HELP!!! I'M TEARING MY HAIR OUT!!
Topic hijack!
hi bryan,
The topics are different. Drupal Multisite installation and godaddy multidomain installation are two different topics!
Anyways:
instead of creating: http://drupal.bryansbiz.com
Create subdomain called: http://test.bryansbiz.com and point it to "./drupal/test/" or point your godaddy multidomain to this folder.
Also put all your drupal files in ""./drupal/test/"" instead of "./drupal/sites/test"
Regards,
Amit
Email: drupalexpertamit@gmail.com
Sorry, but I haven't had
Sorry, but I haven't had much response in other forums. Sorry for buggin :o)
I didn't realize there was a multidomain module for Drupal, so perhaps we are speaking two different languages. Nevertheless, if you have any suggestions, please let me know. Just for clarification, my "test" folder exists in ./drupal/sites/test as a multisite. I've tried pointing subdomains to this folder, but it doesn't seem to work (just gives me an error from the default site).
B
Can't run clean url on godaddy
My drupal site is not in the root directory either and I tried the method of uncommneting rewritebase/ but it doesn't work for me.
I have tried calling godaddy to help me with the configuration but since my site is hosted on shared hosting, the support isn't there.
Did you place .htaccess file in the subdirectory where your drupal site is running? Also, was there anything else that you had to do in order to configure the clean urls? What php version are you running your site?
If you could write little more on how you solved this problem, that will really help me. I never had this issue until with godaddy.
Thanks.
Can't run clean url on godaddy
On GoDaddy when you modify the .htaccess file, it takes an hour or more for the changes to take effect. This file is normally cached, so you won't know right away if your changes have done the trick.
Search on Druapl.org first
http://drupal.org/node/89089
Clean URLs with GoDaddy Shared Hosting - How to make it work.
I wanted to point this out for fellow novices (I didn't catch on to this immediately)....
Clean URLs DOES work fine with GoDaddy Shared hosting. The techs are worthless, so you are on your own. Don't waste time calling.
If you are using Shared Hosting (the cheap plans) the make sure you understand that there is a DIFFERENT ".htaccess" file for EACH OF YOUR WEBSITES!!!
example:
www.yoursite.com is the hosting account. All the other domains are aliased to that account. so if you have other domains it will look like this....
www.yoursite.com/site1
www.yoursite.com/site2
Each one of these folders on the server will have it's OWN ".htaccess". Log onto the FTP client in the Hosting Control Center (it's under Content)
You'll see your root. It has an ".htaccess" file. This one ONLY effects the root domain.
If you wanted to use clean URLs on "Site 2" for example, you must change directories to THAT folder.
In it you will see ANOTHER ".htaccess" file. THIS IS THE ONE YOU NEED TO MODIFY. All of the previous posts are right. Just put the "RewriteBase /" where it goes as stated above. It just hasn't been clarified that you need to do it in each folder with each file.
It's VERY easy to use the web based FTP client. Just copy the ".htaccess" file to your desktop, open it with WordPad (not notepad - it will lose all the formating) and modify it, save it, then upload it right back up to where you got it. If you are really nervous about screwing something up just rename the old one to ".htaccessOLD" or something like that.
After it's modified, log back into that site, go to administration - clean URLs, run the test, and it should work.
So if you have 6 sites on your account - you will have 6 files to modify. Doing it to the file in the ROOT directory does nothing to your other sites. This may be a nobrainer to a lot of you, but logging on and seeing that file in the root makes it real easy to think it's the one you need to work with.
Hope this helps all the other frustrated GoDaddy customers. They don't offer ANY support for Drupal - saying it's a "third party app" even though they offer it as an install in the Hosting Connection Control panel. It is very convenient install from there. Also it seems they are offering one click UPGRADES now to the latest version too. So even though I give them an 'F" for Drupal support, it is possible to host multiple Drupal sites there for cheap. I'm finally pleased, now that the URLs are working right. It's just frustrating that the solution came from here (for free) rather than the hosting company I am paying money to.
W.J. Britt
One last thing for GoDaddy.
One last thing for GoDaddy. I couldn't get it working properly until I added a '/' in front of index.php in the 'Rewrite current style URLs' section.
Before
# 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]
After
# 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]
Just curious did you make
Just curious did you make sure and uncomment the 'RewriteBase /' line?
Adding '/' in front of index.php didn't work
Your suggested change didn't work for me. Now i haven't waited an hour for this change, nor any other change i made.
Running Clean URL Test gives "white screen of death"
Aloha,
I have the cheap godaddy linux hosting.
I have drupal installed in the root of my domain.
I edited the .htaccess file with the downloaded zip file offered above.
I edited the .htaccess file to: RewriteBase / (because its installed in the root - no multi-site setup)
I uploaded the .htaccess file to proper directory.
I even tried including the following lines:
#php5 in GoDaddy accountAddHandler x-httpd-php5 .php
AddHandler x-httpd-php .php4
When I test phpinfo I find that I am running PHP 5.1.4
When I run the Clean URL Test I get the "white screen of death."
Nothing loads, no source code.
> Do I really have to wait for the .htaccess file to refresh in the cache or propigate? I have waited about an hour and no changes in the Clean URL Test...
> Any more suggestions? I would be super grateful. Thank you.
.htaccess not working on Godaddy, Linux shared, php5, config 2.0
Hello, I have read through all the comments related to htaccess and godaddy and have tried them all. I installed drupal at the root of my site without getting any errors. At this point htaccess is preventing my root domain from resolving. Should I use a filename other than index.html as my homepage (which is temporary until I learn how to build a drupal site)? I'm very new to drupal obviously. Does the entire site need to be controled by drupal once you install this file? I haven't been able to get beyond the installation process. This is my current htaccess file. Any help is greatly appreciated...
I posted the file here since it looks like the code will be parsed in the forum...
http://www.smalldownloads.com/htaccessTest.txt
Thank you in advance.
Clean URLs on godaddy
I am new to Drupal and I am trying to enable clean URLs for my website.
I have read all the above comments and modified .htaccess file in my drupal root directory by uncommenting
RewriteBase / still my clean URL options are grayed out.
Any help in this regard will be appreciated.
Thanks in advance
Drupal admin panel
The clean urls need to be first enabled from Drupal's Administration panel (unless you enabled while installing the v6.x branch).
You will see a small link that says "Run the clean url test", click on that, and if all goes well, the options will be enabled for you the select.
if the test fails, then probably the .htaccess file settings need to be changed... btw, clean urls wont work on godaddy if you are on windows hosting package!
My 0.02
Regards,
Amit
Email: drupalexpertamit@gmail.com
Below is my HTACESS file. I
Below is my HTACESS file. I have a main site www.site1.com then I have www.site2.com as a file under the www.site1.com root folder. Below is my htaccess file and I cannot get clean URL's to work
This of course is on go daddy deluxe hosting package.
#
# 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.
# There is no end quote below, for compatibility with Apache 1.3.
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'.
RewriteBase /
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.3 2008/12/10 20:04:08 goba Exp $