I use WordPress for nearly all of my web sites, but I still own two Drupal sites. As I posted previously, I moved all my sites to GoDaddy within the last month, and these two sites were no exception. I started up a premium account, and had a main domain, and then in their control panel I mapped domain names to sub-folders. This is very handy for me in ftp, all of my web sites are available to me in one place, separated only by folder.
At first my Drupal sites appeared to work fine when I migrated them. However, it was only the home page. Any link you clicked on came up server error – both Drupal sites. I knew GoDaddy allowed Drupal, they have an autoinstall available for it in Metropolis. I setup a test dir and installed Drupal there using the automated tool. It had the same problem. Now I knew that it wasn’t my site, it was a GoDaddy problem. I called GoDaddy tech support and they raised an elevated ticket to the an advanced tech. I explained the problem to him, and told him I thought it had something to do with the .htaccess files or server setup. His response was that they “don’t debug code”.
I was going to respond when I figured out what the problem was. My main domain had it’s own (wordpress) .htaccess file. I thought at first that was the problem. Then I remembered, when you have a shared host with domains mapped to sub-directories it’s setup in the apache httpd.conf file I believe (hardcoded). Essentially, when a request comes in to that IP address from a domain name, the web server knows which folder to forward it too. (Without some customization) I don’t think the web server could handle that redirect, on top of an .htaccess file rewriting the URL’s to ‘clean url’s’ (permalinks).
So – long story short, IF you have an GoDaddy hosting account, and IF you have multiple domain names (and you’re planning on using clean URL’s), you can only do it from the root of your account (or main domain name) only. I did fix the problem, but ended up buying two additional basic hosting accounts ($3.99 per month) for each domain, and then both sites worked flawlessly.
If you have some other fix (or comment) related to hosting Drupal or WordPress sites at GoDaddy – please comment now below!
hi jtpratt!
i faced a similar problem. But i managed to fix this by creating a new .htaccess file in the (subfolder/root) of my 2nd domain. This is the code for the modified .htaccess file
Have fun! no more dual purchases from godaddy 🙂
AmitG
Email: rapidsynopsis@gmail.com
Website: http://www.rapidsynopsis.com
_________________________________________________
#
# 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 $
_________________________________________________
I couldn’t get the code above for .htaccess to work, but using rewritebase / seems to do the trick — except that now my images don’t show correctly.
Anyone know anything about the images bonking up now? They’re put in by FCKeditor in the /files/ directory.
=)r
Mind you, with just rewritebase / – trying to view the site directly from the original location: http://www.example.com/site1 will pop you back into the “main” godaddy site. but its reachable by the main URL except for images. :/
Ugh, I wish I had seen this tip before I uninstalled Drupal and put WordPress on my new site.
Beside the clean url issue, I was also having real trouble setting up a drupal forum. Do you know of any good tutorial sites for drupal?
Dana Vienass last blog post..The Whole Truth About Diet Pills
@Dana – no I don’t, I used Drupal exclusively on all my sites for 2 years and then changed them all over to WordPress for that very reason. Compare to WordPress, there are only (maybe) 5-10% as much themes, plugins, and support for Drupal. I hate Drupal – I will never go back…
@Dana – If you’re still having a lot of problems with the Drupal forums and haven’t stuck to WordPress I’d be happy to help you.
I found that Drupal v. 6.x installs an .htaccess file in the mapped domain subfolder – I had the same problem, but changing the rewrite base from “/drupal” to “/” fixed it, as AmitG mentioned.
Krikette, my images are also in “files”, and they work swimingly. The only problem I had is that in the previous, non-drupal version of the site, they lived in “/images” and I had to re-path all the html to reference “/files”.
Cheers.
Dougs last blog post..Seobook Review (Part 1)
God bless you all. I was having a hell of a time trying to figure this problem out. What solved it for me was Doug’s answer.
I changed uncommented RewriteBase /drupal and deleted the drupal part.
# 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 /
And it worked perfectly within seconds.
yikes!
I have a deluxe hosting plan with GoDaddy where my main hosting domain has Drupal installed in it and the domains in my subdirectories have WordPress installed in them… My main domain/Drupal is working fine, but my subdirectory domains get a 403 and subsequent 500 server error when the WordPress blogs try to be retrieved! I worked through the .htaccess file and uncommented the rewritebase / which is how my subdirectory domains even get to show their pretty faces, but how do I make sure the WordPress part of them not have an error!
sorry… obviously my 5th hour trying to figure this out and perusing the net for someone in the same boat.
Looks like the above post are from 2007! yikes again.
well, my only comment is that it sucks to be the owner of a Drupal web site – doesn’t it? You wouldn’t have that problem if WordPress was the root web site. My only advice is to try the drupal forums for how their htaccess file works.
Can I use a downloaded theme on there? I have seen some WordPress hosted blogs with different themes, so it looks like it’s possible.