Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-6891

Argument on usage of SERVER_NAME

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 3.0.1
    • 3.0.0
    • Other
    • None
    • PHP Environment:
      Database:

      function generate_board_url() on file /includes/functions.php line 1718 gets the name of the domain using the variable $_SERVER['SERVER_NAME'] .

      I think this is wrong. It should be using $_SERVER['HTTP_HOST'] instead.

      The reason is that HTTP_HOST can contain a subdomain whereas SERVER_NAME has only the TLD. So for example if you want your site to be called http://www.example.com, the way generate_board_url() works now will always return http://example.com .

            Acyd Burn Meik Sievertsen [X] (Inactive)
            cpulse cpulse [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: