0

I've got several Drupal sites on different domains running on the same code using sites.php.

What I want to do is point the same domain to different sites depending on whether it's accessed via http or https.

For example, in sites.php $sites['http://www.example.com']='site1'; $sites['https://www.example.com']='site2';

However, the above doesn't work. It looks like you can't specify protocol in sites.php.

Thanks,

Robin

1 Answer 1

2

Please read through the default example.sites.php file again. A protocol is the same thing as a port (they have a 1-to-1 relationship when we talk about a webserver).

http is implied by default in the rule describing www.example.com. http is also implied to be Port 80, otherwise known as :80 in a URI-scheme.

Your format is completely wrong for any subsite defined in $sites. From the documentation it would be:

$sites['www.example.com']='site1';   // Normal HTTP www.foo.com
$sites['443.www.example.com']='site2';  // SSL version (port 443 by default for www.foo.com)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.