DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35350>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35350

           Summary: No directive "Define" and "Undefine"
           Product: Apache httpd-2.0
           Version: 2.0.54
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


If I want multiple functions ( ex. redirection for a real site or a test site )
for a configuration file, then "IfDefine" directive is a only way in actually.
Only commandline options can specify parameters referred by "IfDefine".
"Define" and "Undefine" directive can specify parameters in configuration file.

These directives are useful in a following case : an apache provides a two
sites, "real.example.com" and "test.example.com", using name based virtual
hosts. "real.example.com" redirects "real.example.org". "test.example.com"
redirects "test.example.org".

httpd.conf:
  ...
  <VirtualHost *>
    ServerName real.example.com
    Define HERE_IS_REAL
    Include content-foo.conf
    Include content-bar.conf
  </VirtualHost>
  <VirtualHost *>
    ServerName test.example.com
    Define HERE_IS_TEST
    Include content-foo.conf
    Include content-bar.conf
  </VirtualHost>

content-foo.conf:
  ...
  <IfDefine HERE_IS_REAL>
    Redirect /foo http://real.example.org/foo
  </IfDefine>
  <IfDefine HERE_IS_TEST>
    Redirect /foo http://test.example.org/foo
  </IfDefine>

content-bar.conf:
  ...
  <IfDefine HERE_IS_REAL>
    Redirect /bar http://real.example.org/bar
  </IfDefine>
  <IfDefine HERE_IS_TEST>
    Redirect /bar http://test.example.org/bar
  </IfDefine>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to