Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15359

access.php - new MatchOrder=host_uri

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Medium Medium
    • Future
    • 4.0.6, 4.1.3, 4.2.0alpha1
    • Documentation, Misc
    • None

    Description

      new MatchOrder=host_uri & enhancement of MatchOrder=host

      If you are running different projects on one ez installation you have a lot of siteaccesses and may be every project has different languages. On multisite hosting with ez standard we are using host matching.

      This allows us the following:

      MatchOrder=host
      
      URL => siteaccess
      www.example.com    =>   example_com_user_en
      admin.example.com =>   example_com_admin
      www.example.de    =>   example_com_user_de
      

      If you want to have only one domain and using the uri element to switch the siteaccess with a name like /de /en ... you can't do this in combination with the hostname. We create a new MatchOrder=host_uri for this requirement.

      MatchOrder=host_uri
      
      URL => siteaccess
      www.example.com/en    =>   siteaccess_en
      www.example.com/de    =>   siteaccess_user_de
      
      www.example.com         =>   siteaccess_user_de  (default if no urielment set)
      
      
                  # example site.ini
      
                  [SiteAccessSettings]
                  MatchOrder=host_uri
                  HostURIMatchMapItems[]
                  HostURIMatchMapItems[]=www.example.com;de;siteaccess_user_de
                  HostURIMatchMapItems[]=www.example.com;en;siteaccess_en
                  
                  DefaultHostURIMatchMapItems[]
                  DefaultHostURIMatchMapItems[]=www.example.com;de;siteaccess_user_de
                  
                  # http://www.example.com/de/content/view/full/2 =>  sitaccess_user_de
                  # http://www.example.com/en/content/view/full/2 =>  sitaccess_en
                  # http://www.example.com => siteaccess_user_de (default)
      
      

      Hopefully we will see this new 'host_uri' included in the ez kernel.

      == enhancment hostname matching ==
      We enhance the matching of the current hostname to the definition from site.ini (HostURIMatchMapItems, HostMatchMapItems ) in this way that it checks

      is the current hostname 'begins_with' the hostmathcmapItem from ini than match.
      This is very usefull for setting up different servers e.g. live, testing, lokal
      without changing the configuration of ez.

      www.example.com/de =>  live
      www.example.com.jac401.fw.lokal/de =>  my lokal development server
      www.example.com.jac401.testing.de/de =>  testserver
      
      All hostnames are matching to => siteaccess_user_de
      

      We use this every day and all developer are happy

      Let me know if you find this patch usefull.
      Thank's

      Attachments

        Activity

          People

            andre1 andre1
            4d91e976-d41f-487b-ae85-f7216bd06dac@accounts.ibexa.co Felix Woldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: