System: Drupal 5.10 - Apache/2.2.3 - PHP 5.2.0 - MySQL 5.0.26 - DNS: djbdns 1.05
I made all the installation steps correctly in Readme.txt (I think).
Symptom:
HTTP request to http://subdomain-test.portal.mydomain.hu/subdomain/test returned the following result:
HTTP_HOST: subdomain-test.portal.mydomain.hu
QUERY_STRING: subdomain/test
REQUEST_URI: subdomain/test
SCRIPT_FILENAME: /srv/www/htdocs/hosted/siteb/index.php
The REQUEST_URI should have been rewritten as '~subdomain-test/subdomain/test'.
Your web server is not rewriting your URLs correctly.Apache config:
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@mydomain.hu
DocumentRoot /srv/www/htdocs/hosted/siteb/
ServerName portal.mydomain.hu
ServerAlias *.portal.mydomain.hu
<Directory "/srv/www/htdocs/hosted/siteb/">
AllowOverride All
</Directory>
</VirtualHost>I confirmed that I correctly patched .htaccess file.
I modified settings.php:
$cookie_domain = "example.com";
I installed my drupal under "portal.mydomain.hu" domain name with pathauto 5.x-2.3 and og 5.x-7.3 modules.
I created og content type and two organic group ("a" and "b").
When I enabled the subdomain module and enter under "portal.mydomain.hu" domain, i get "page not found".
Only under "www.portal.mydomain.hu" domain can I enter into my site.
Where may I have ruined it?
Comments
Comment #1
nagygdev commentedCorretly:
I modified settings.php:
$cookie_domain = "portal.mydomain.hu";
So, where may I have ruined it?
Comment #2
setvik commentedSubdomain currently just supports 2-level domains out of the box (e.g. example.com).
To support base domains with 3 levels like yours, open your .htaccess file and scroll down to the following section added by the htaccess patch:
Change the 2nd and 3rd RewriteCond statements to the following:
Give that a try and let me know how it goes.
Comment #3
setvik commentedComment #4
nagygdev commentedIt works!
Perfect. This is a solution.
Thank you setvik!
Comment #5
setvik commentedNo problem :-).
Glad you were able to get it working
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
Dimm commented$cookie_domain in settings.php - Not yet set
I set $cookie_domain="subdomain.domain.com" in settings.php, but it not work.
I add to htaccess (as #2 )
, but it not work.
Can you help me?
Comment #8
setvik commentedDid you uncomment the $cookie_domain line? i.e. did you remove the "#" from in front of "$cookie_domain"?
Comment #9
setvik commentedComment #10
Dimm commentedDid you uncomment the $cookie_domain line? i.e. did you remove the "#" from in front of "$cookie_domain"?
Yes :)
Comment #11
setvik commentedDimm,
whoops, I should have noticed this before, but if you are using the latest version of 6.x, you don't need to change your .htaccess file in any way.
i.e. If you put the following section in your .htaccess file
go ahead and remove it
Comment #12
Dimm commentedI found error!
First I comment string
# $cookie_domain = 'example.com';
And write my string
$cookie_domain = 'mydomain.com';
It give error.
$cookie_domain in settings.php - show/hide details Not yet set
Now I delete string
# $cookie_domain = 'example.com';
Work Ok:
$cookie_domain in settings.php - show/hide details Set
Problem in function subdomain_check_cookie_domain()
It found comment line # $cookie_domain = 'example.com'; and give error.
Comment #13
setvik commentedglad you were able to fix it :-).
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.