Hi there,

Am trying to set up subdomains with D5.7.

I followed the instructions to set up the module, but when I make a new group, the URL I get looks like this

http://www.domain.com/subdomain.domain.com

Clearly this isn't what we're trying to get.

The pathauto entry for my group content type is [subdomain].domain.com

So it looks like pathauto is picking that up just fine, its just not being substituted for the base URL like it should be.

I followed your instructions as carefully as possible but either I did something wrong or there's confusion somewhere.

Judging by the URLs that I'm getting. Where do you think the problem is?

How do I get this wonderful module working?

Also, you might want to write a little more about how this interracts with pathauto, perhaps providing a few examples so that is explicit and not mysterious at all.

Comments

bflora’s picture

UPDATE:

Ok.

So i'm able to rewrite my group URLs to subdomain.domain.com. That's great.

However, when I navigate to one, example getupstandup.windycitizen.com ..... it dumps me to windycitizen.com

What could be causing that? Is there a setting somewhere I need to change?

I've gone over my a records and all the steps in your install instructions several times. I've got a few groups I've made that have the desired URL structure.....but I can't navigate to them. I get dumped to windycitizen.com.

I have posted a paid drupal service to anyone who can help me get this module to work. http://drupal.org/node/288006

setvik’s picture

First question: have you enabled Clean URLs?
That's a requirement I neglected to add to the Readme.txt

2nd Question: are you setting this up on Shared Hosting? or your own server (virtual or otherwise)...

If Drupal is generating subdomain links on your site correctly, your pathauto and subdomain settings are good to go.

If browsing to a subdomain link takes you to the frontpage, however, it means Apache is not rewriting your subdomain URLs correctly.

If Clean URLs is enabled and working, the problem is either your .htaccess file:

It should read at the bottom as follows:

  # REQUIRED BY SUBDOMAIN.MODULE
  # Moves subdomain to URI path
  # e.g: mysubdomain.example.com 
  # becomes example.com/index.php?_mysubdomain/
  # NOTE: does not rewrite subdomain if it is "www". 
  # If you want it to rewrite www, disable the 2nd line
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} !^www\.([^.]+)\.([^.]+)$
  RewriteCond %{HTTP_HOST} ^([^.]+)\.([^.]+)\.([^.]+)$
  RewriteRule ^(.*)$ index.php?q=~%1/$1 [L]

  # 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]
</IfModule>

or your Apache configuration:

In your apache config, you'd need to have an "AllowOverride All" in the section of the definition for your website.

If you've got everything setup as described above and it's still not working, can you do a quick test for me?

1) backup your index.php file (e.g. cp index.php index.php.save)
2) replace the contents of index.php with the following:

<p>HTTP_HOST: 
<?php print $_SERVER['HTTP_HOST'] ?>
<p>QUERY_STRING:
<?php print $_SERVER['QUERY_STRING'] ?>
<p>REQUEST_URI: 
<?php print $_SERVER['REQUEST_URI'] ?>

3) save and then surf to a subdomain URL (e.g. getupstandup.windycitizen.com)

The output (for getupstandup.windycitizen.com) should read:

HTTP_HOST: getupstandup.windycitizen.com

QUERY_STRING: q=~getupstandup/

REQUEST_URI: /

If the above doesn't work (i.e. the output isn't as shown above), the easiest thing would be for me to walk through the problem with you via a skype / remote-access / remote-control session online. If you'd like to do that, just shoot me an e-mail and we can figure out the details.

setvik’s picture

Status: Active » Postponed (maintainer needs more info)
setvik’s picture

Status: Postponed (maintainer needs more info) » Fixed

After working with bflora, we discovered the issue was the compound result of an incorrectly configured apache configuration file and a conflict with the globalredirect module.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.