Hi all.

I have drupal set up on my pc using Xampp. It is in a directory: e.g. /company-name. Everything works perfectly there.

On Bluehost, I have a main domain (e.g. myhostingaccount.net) and an addon domain for the client (companyname.org)

The drupal installation is physically located in a subfolder the same as on the pc: /company-name. and when I go to www.myhostingaccount.net/company-name everything works. When I redirect companyname.org to the subdirectory and go to that url, links break.

Thoughts?

Thanks,

Shrill

Comments

shrill’s picture

Okay, so if I click on a link I get sent to:
http://www.companyname.org/publications?q=company-name/publications
When I remove the part from the ? I end up at the right page.

I have tried several things but am a bit of a newbie with config/ htaccess. Here is my settings.php:




/**
 * 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://companyname.org';  // NO trailing slash!

Should I have something else there?

Cheers,

Shrill

shrill’s picture

I've had my host look into it and they aren't much help.

Basically, the menu items work fine when it is in the addon domain. The links within the content itself do not: they add the folder to the link where the site is physically located (but where the site shouldn't think it is located).

eg. the site is actually located at public_html/company_website. So is you go to http://www.mainurl.com/company_website all links work fine. At http://www.company_websiteaddonurl.com, the menu items work but the links within the content do not. Instead they continue to add /company_website into the url (whereas they should be eg. www.company_websiteaddonurl.com/link, instead they are www.company_websiteaddonurl.com/company_website/link)

I think this may be because of pathauto? since I created the links in the content using pathauto (using the automatically generated names). So I could go back in and change them to node/111 etc.

However, that means that in some cases there is a menu item pointing to the pathauto version and a link pointing to the node/111 version...different urls for the same content, ie duplicate content.

Anyone here use bluehost with an addon domain? How did you do it? They don't really need to use the normal domain for anything at the moment: if I move the files into the main domain would that work? Would doing that break the site?

Thanks

Shrill
p.s. sorry no examples: this is offline until I can get it to work

mm167’s picture

if the host is not helpful, dont pay to them ...

tell us how u did the "redirection"......the devil is hiding there ...

shrill’s picture

they just can't figure it out :)

The redirection was accomplished using the domain manager (hosting tab) within Cpanel. It lists my domains, including my addon domain. I click to assign the addon domain and assign it to the directory where the website resides.

Thanks,

Shrill