example.sites.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * @file
  4. * Configuration file for Drupal's multi-site directory aliasing feature.
  5. *
  6. * This file allows you to define a set of aliases that map hostnames, ports, and
  7. * pathnames to configuration directories in the sites directory. These aliases
  8. * are loaded prior to scanning for directories, and they are exempt from the
  9. * normal discovery rules. See default.settings.php to view how Drupal discovers
  10. * the configuration directory when no alias is found.
  11. *
  12. * Aliases are useful on development servers, where the domain name may not be
  13. * the same as the domain of the live server. Since Drupal stores file paths in
  14. * the database (files, system table, etc.) this will ensure the paths are
  15. * correct when the site is deployed to a live server.
  16. *
  17. * To use this file, copy and rename it such that its path plus filename is
  18. * 'sites/sites.php'. If you don't need to use multi-site directory aliasing,
  19. * then you can safely ignore this file, and Drupal will ignore it too.
  20. *
  21. * Aliases are defined in an associative array named $sites. The array is
  22. * written in the format: '<port>.<domain>.<path>' => 'directory'. As an
  23. * example, to map http://www.drupal.org:8080/mysite/test to the configuration
  24. * directory sites/example.com, the array should be defined as:
  25. * @code
  26. * $sites = array(
  27. * '8080.www.drupal.org.mysite.test' => 'example.com',
  28. * );
  29. * @endcode
  30. * The URL, http://www.drupal.org:8080/mysite/test/, could be a symbolic link or
  31. * an Apache Alias directive that points to the Drupal root containing
  32. * index.php. An alias could also be created for a subdomain. See the
  33. * @link http://drupal.org/documentation/install online Drupal installation guide @endlink
  34. * for more information on setting up domains, subdomains, and subdirectories.
  35. *
  36. * The following examples look for a site configuration in sites/example.com:
  37. * @code
  38. * URL: http://dev.drupal.org
  39. * $sites['dev.drupal.org'] = 'example.com';
  40. *
  41. * URL: http://localhost/example
  42. * $sites['localhost.example'] = 'example.com';
  43. *
  44. * URL: http://localhost:8080/example
  45. * $sites['8080.localhost.example'] = 'example.com';
  46. *
  47. * URL: http://www.drupal.org:8080/mysite/test/
  48. * $sites['8080.www.drupal.org.mysite.test'] = 'example.com';
  49. * @endcode
  50. *
  51. * @see default.settings.php
  52. * @see conf_path()
  53. * @see http://drupal.org/documentation/install/multi-site
  54. */