I have drupal installed in a subdirectory of the root named "drupal". I'm using the htaccess files to redirect the subdomains: sub1.site.com and sub2.site.com point to www.site.com. Was working fine. Once I installed RC4, the URLs for the subdomains all have the drupal folder tagged on the end; sub2.site.com/drupal/ . I don't see what would be causing this. I'd really like for it not to be there. Any ideas?
Thanx
jdcllns
Comments
Comment #1
agentrickardAnd this didn't happen with RC3? Or you just now installed the module?
Have you changed any settings?
The two functions that would control this are pasted below.
But these have not changed in RC4.
Comment #2
jdcllns commentedThanks for getting back to me so quickly.
Since I submitted this, I've discovered that I actually have larger problems than I thought. Our DNS is botched up. Gotta resolve that first.
Comment #3
agentrickardThat is (hopefully for me) the cause.
Comment #4
jdcllns commentedI'm finally back to where I was when I originally submitted this req.
Originally I had:
drupal 5.6
domain-5.x-1.0beta7
Hosted at godaddy. The sub-domains pointed to /drupal where it's installed. Using htaccess mod-rewrite to get everything resolving the way I wanted. I could switch between the domain and subs:
www.localmoms411.com
huntsvilleal.localmoms411.com
madisonal.localmoms411.com
In preparation for the next phase of development, I completely blew away the drupal installation and loaded:
drupal-5.7
domain-5.x-1.0rc4
Immediately the sub-domains started returning an Internal Server Error. Finally I set the sub-domains to point to the root dir. They are now accessible, but they have the drupal path on the end of the URL:
http://madisonal.localmoms411.com/drupal/
That's everything that I can think of. Any idea what's going on?
Comment #5
agentrickardYes. The two functions noted above were not present in beta7. But they are necessary in order to write links properly, so I'm not sure how to address your issue.
Comment #6
agentrickardThose two functions, by the way, are leveraging the $base_url as set by Drupal in bootstrap.inc.
http://api.drupal.org/api/file/includes/bootstrap.inc/5/source
Were you setting $base_url manually in settings.php before upgrading?
It could also be the request_uri() part.
http://api.drupal.org/api/function/request_uri/5
Comment #7
jdcllns commentedIt's not so much that I'm worried about what I was doing, I was just pointing out that I had made it work before. It's more of a need to get it working now. I deleted everything from the server and did a new install, using instructions from install.txt that came with RC4. But, I am still using the same htaccess files.
Your instructions say that it is not necessary to set $base_url, so it's not set. Was it supposed to get set when during installation of drupal of the domain module?
Comment #8
agentrickardThe issue is that when people set $base_url, they typically set it to http://example.com. But you cannot do that with Domain Access, because $base_url needs to change dynamically based on the active domain.
There are two potential solutions, or one simple option.
Simple option:
-- Don't put Drupal in a subfolder -or- don't worry that people see the folder. (You could call it 'content' instead of 'drupal').
Code solutions:
-- Configure something in .htaccess to hide the folder string. I do not know how to do that.
-- Insert the following code (or something similar) into settings.php in order to configure $base_url dynamically but ignore the subfolder.
For background on why this was changed, see:
-- http://drupal.org/node/196217
-- http://drupal.org/node/200066
-- http://drupal.org/node/195366
Comment #9
jdcllns commentedThe htaccess isn't my forte either, but I did get something cobbled together that works with one domain and worked with beta7.
I don't really care if viewers see the /drupal on the end of the URL. The problem is that it's getting stuck in the middle of links. The links on the primary domain work just fine. The Domain list navigator even works. But links on the sub-domain pages do not because they have the extra /drupal folder info.
http://huntsvillal.localmoms411.com/drupal/node/18 doesn't work. Remove the /drupal and it works fine: http://huntsvillal.localmoms411.com/node/18.
Also, I really hate the thoughts of moving drupal up to the root dir as it's files would get mixed in with other things there.
Comment #10
agentrickardOK. What you are saying now is not what I understood you to say earlier.
It seems that the .htaccess rules that you have are not compatible with the way that $base_url is being constructed. I think this code should work for you. Put it in settings.php
That should prevent Domain from inserting the file system path into links.
Comment #11
jhcannon commentedI had the same issue. This fixed it.
Now - When it shows the sub, it shows the welcome to Drupal page. I created a page and set the publish to to my sub and my main. One the main its shows the page and the two subdomains but it doesn't show on the sub page?
What am I missing?
Do I need to enable the module on my subdomains too?
Comment #12
agentrickardI totally do not understand what you say here. Please use complete words and sentences.
As to this:
Domain Access assumes that you only have one installation, one settings file, and one database, so this question is not relevant. Perhaps you are trying to do something like http://drupal.org/node/218368.
Comment #13
jhcannon commentedMy navigation menu on the left on my main domain shows:
Welcome (my main domain home)
Test (the test page I created)
Create Content
Main Domain Name
Sub Domain Name
Sub Domain Name
...
If I click on Test, it shows my page and at the bottom of the text it says Subdomains : Sub Domain Main Domain
Now when I navigate to Sub Domain Name from either my navigation or from the browser, I get the Welcome to Your New Drupal Site. I was thinking that I should see that Test page that I had created and published to that subdomain.
Am I not understanding what the module should do or have I got something not set up?
Comment #14
agentrickardThanks. This makes sense to me. But instead of Sub Domain Name, please use Domain 1, Domain 2, or one.example.com, two.example.com.
This part: Subdomains :
Sub Domain Main Domainis the debug message and tells you which affiliates the content should be shown on.If you click through to any of the domains listed there, the node should be visible. If it is not, there could be a bug. Can you re-post, using clearer names for the subdomains.
Comment #15
jhcannon commentedMy navigation menu on the left on my main domain shows:
Welcome (my main domain home)
Test (the test page I created)
Create Content
www.newsforahl.info (Actually shows text name but I thought this would make more sense)
ausband.newsforahl.info
cannon.newsforahl.info
...
If I click on Test, it shows my page and at the bottom of the text it says
Subdomains :
ausband.newsforahl.info
www.newsforahl.info
Now when I navigate to ausband.newsforahl.info from either my navigation or from the browser, I get the Welcome to Your New Drupal Site. I was thinking that I should see that Test page that I had created and published to that subdomain.
Comment #16
agentrickardYou should. Can you look in your {node_access} table and report what's there.
You might also install the Devel module to view node access settings http://drupal.org/project/devel
Comment #17
agentrickard@jhcannon
We have really hijacked this thread. It would be best to open a new issue, copying #15 and posting your {node_access} table.
Comment #18
jhcannon commentedHere is my table.
nid gid realm grant_view grant_update grant_delete
1 0 domain_site 1 0 0
1 0 domain_id 1 0 0
2 1 domain_id 1 0 0
3 0 domain_site 1 0 0
3 0 domain_id 1 0 0
4 0 domain_site 1 0 0
4 0 domain_id 1 0 0
0 0 domain_all 1 0 0
2 0 domain_id 1 0 0
5 1 domain_id 1 0 0
5 0 domain_id 1 0 0
I think I might have figured out something else too.
I tried to do a multisite / multidomain set up before this and the instructions that I followed had me do symlinks from the ausband (subdomain) folder to the drupal/sites/ausband.newsforahl.info folder. So I am thinking that is getting in the way.
Comment #19
jhcannon commentedOkay. I renamed the sites/ausband.newsforahl.info folder and changed the ausband subdomain to the root folder and now I see the same thing I do on www.newsforahl.info .
Getting closer!
I went back to the domain settings and found why the same was showing on both. I promoted my test content to the front page. When I am not logged in on ausband.newsforahl.info, I see an access denied page for the front page. I see the test page in the left nav bar but clicking it only gives me the same access denied.
Comment #20
agentrickardYes. I looked at the site and I think you have some Apache issues to resolve.
The {node_access} records above translate to:
-- Show node 5 on the primary domain (domain_id == 0)
-- Show node 5 on domain 1 (which appears to be Ausband; domain_id == 0).
Based on the above, all nodes except node 2 should be visibile on two domains. SO the module seems to be working correctly.
Which one of these is configures as your Primary Domain in Admin > Build > Domains ?
Comment #21
agentrickardEditing previous comments makes it hard to follow the thread.
I think you are using Single Sign On, and have a login issue.
I am going to close this thread and ask everyone to open new issues, if needed.
Comment #22
jhcannon commentedPrimary is 0 www..newsforahl.info
Ausband is 1 ausband.newsforahl.info
I was trying to get it working right and then I can go back and fix the rest of the subdomains.
This is my node access now:
nid gid realm grant_view grant_update grant_delete
0 0 domain_all 1 0 0
1 0 domain_id 1 0 0
2 1 domain_id 1 0 0
2 0 domain_id 1 0 0
3 0 domain_site 1 0 0
3 0 domain_id 1 0 0
4 2 domain_id 1 0 0
5 1 domain_id 1 0 0
I can now see the test page as the front page when I log in on ausband.newsforahl.info but if I am not logged in, I see an Access Denied. How do I get that page to show anyway?
Comment #23
agentrickardjhcannon-
Please help me stay on top of issues. This one has been totally diverted from its original intent, so I closed it.
Once I close an issue, I no longer track it.
Please open a new issue.
Comment #24
jdcllns commentedSorry I just dropped this thread like I did. Had some other fires to put out. Hope to get back to it soon.