Drupal has been installed in a subdirectory of the root called coolsite. URLs are coming up coolsite.com/coolsite/node all the time and I've attempted to remedy this by recreating the domain entry. I want the paths to be coolsite.com/node.
I thought a way to manage this is to setup a development site at dev.coolsite.com and make this the primary domain. Then I would recreate coolsite.com fresh and hopefully without the subdirectory path.
The tranfer of primary domain is made and coolsite.com is deleted.
The registry is rebuilt and chaches flushed.
The domain coolsite.com is recreated but somehow the subdirectory into which drupal was installed persists in being part of the path for the domain.
I've managed to recreate the admin menu with the correct path coolsite.com/admin, but the actual admin pages still require the subdirectory in the path coolsite.com/coolsite/admin.
I've searched the database for uses of the subdirectory and I've managed to make changes to the batch table. There are some occurrences of the subdomain in variables where they seem necessary for appropriate server mapping. Watchdog also has some listings but I imagine these are historical logs.
I suppose this is a bug as the domain details should be completely deleted and recreated from new.
For the moment I can't proceed with development as I see no way to resolve it. I have good .htaccess settings and I've adjusted the setting.php with the necessary line with base url settings hashed out. I don't know how the admin pages are created or how they may need to be recreated. Perhaps it is this, or the base url setting kept by domain access needs to be changed, or something else.
If it's difficult to patch is there a direct way to tackle this issue? I'm not sure it's been dealt with in the Domain Access 3 dev path. I'm also unsure if its possible to upgrade from Domain Access 2 to Domain Access 3.
Comments
Comment #1
pheno commentedComment #2
agentrickardRemoving tags. See http://drupal.org/node/1023102
I don't understand what you are trying to say. You have Drupal installed in a subdirectory but want to hide that fact?
I believe the general solution to that is an .htaccess rewrite and hook_url_inbound_alter(). Nothing at all to do with DA.
Comment #3
agentrickardSince domains don't register subdirectories, this is a generic Drupal problem.
See https://encrypted.google.com/search?q=drupal+in+subdirectory+hide&ie=utf...
Comment #4
pheno commentedThat was the initial plan, but i changed it in favour of having a development and testing subdomain at dev.coolsite.com alongside the main site coolsite.com
The new sub domain dev.coolsite.com works as the primary domain using the primary domain switch function in Domain Access but the admin pages and content for coolsite.com still have pages at the subdirectory coolsite.com/coolsite
Could it be something Domain Access could manage because, I've had a look and considered the further solutions offered in the pages linked and none include the use of domain access which requires that rewrite base_url is disabled.
I'll pursue the "hook_url_inbound_alter()" but its a step up from how I work with drupal. Thank you.
Comment #6
pheno commentedDid I create a problem perhaps by swapping and deleting the main domain? It seems attempts to find the site at 3000realms.com are not being directed into the Drupal system?
I'm relating the rest of the issues back to drupal install as you say sub directories are not stored and I'd second that as I've not seen a trace of the subdirectory stored in paths for a particular domain.
It would seem that it is highly advisable not to install to a subdirectory expecting it not to appear in web pathes especially with domain access as adjustments to settings.php in setting base_url will cause domain access to fail.
Perhaps if hook_url_inbound_alter() was implemented as you say it might be different.
Ive managed to see the links and pathes rewritten with modifications to the web root .htaccess but the images and admin menu are not being rendered ecuase of the missing subdirectory when trying to access files eg.
http://3000realms.com/system/files/website-screenshots/Open-Presence.jpg
but the picture is actually found at:
http://3000realms.com/3000realms/system/files/website-screenshots/Open-P...
Do you imagine hook inbound alter would fix this?
Comment #7
agentrickardYou could do something like this in settings.php (after the domain access include). You can't manually set $base_url, because it changes based on domain. You _can_, however, modify it.
See http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/drupal... and http://api.drupal.org/api/drupal/globals/7 for more.
I don't know if there is anything to be done about the files issue. That's an Apache problem.
The above code should make all Drupal-written links ignore the base directory. Then I believe it's up to Apache to fill that it when fulfilling the request.
Comment #8
pheno commentedThank you, I've been trying to resolve the rest of the problem.
Getting the URL rewrites and getting the exceptions for file pathes is not at all easy to do with multiple domains.
This is in the case of installing Drupal in a subdirectory. Best advise people not to install to a sub directory to avoid complication further down the line. Unless you have suggestions it seems time to redo the sites and installation....
Comment #9
agentrickardSadly, I agree with that.
Comment #10
agentrickard