Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-155163

Add configuration to choose between 301 and 302 redirections for friendly URLs

    Details

      Description

      For pages where we're doing redirections from old friendlyURLs to new friendlyURLs

      The solution needs to be in 7.3. We might decide to start in master and backport or do it directly in 7.3

       

      NOTE: The client uses Public Page Virtual Hosts (which suppress the /web/site_friendly_url) so we should ensure that scenario is supported with the change etc.

       

      Acceptance criteria

      Given an instance
      And a page with multiple friendlyURLs (home-old and home-new for example)
      And locale.prepend.friendly.url.style = 0
      And the configuration in instance settings -> pages -> friendlyURLs redirections set to temporary
      When a user accesses http://localhost:8080/home-old
      Then the user will be redirected to http://localhost:8080/home-new with 302 http code

       

      Given an instance
      And a page with multiple friendlyURLs (home-old and home-new for example)
      And locale.prepend.friendly.url.style = 0
      And the configuration in instance settings -> pages -> friendlyURLs redirections set to permanent
      When a user accesses http://localhost:8080/home-old
      Then the user will be redirected to http://localhost:8080/home-new with 301 http code

       

      Given an instance
      And a blog entry with multiple friendlyURLs (entry-old and entry-new for example)
      And a display page template for blogs set as default
      And locale.prepend.friendly.url.style = 0
      And the configuration in instance settings -> pages -> friendlyURLs redirections set to temporary
      When a user accesses http://localhost:8080/b/entry-old
      Then the user will be redirected to http://localhost:8080/entry-new with 302 http code

       

      Given an instance
      And a blog entry with multiple friendlyURLs (entry-old and entry-new for example)
      And a display page template for blogs set as default
      And locale.prepend.friendly.url.style = 0
      And the configuration in instance settings -> pages -> friendlyURLs redirections set to permanent
      When a user accesses http://localhost:8080/b/entry-old
      Then the user will be redirected to http://localhost:8080/entry-new with 301 http code

       

      Test Scenarios

      ID Test Priority Test Scenarios Covered by Backend (Unit/Integration)? Test to add
        5 The redirection type can be configured as temporary in the instance settings  NO FriendlyURLService#TemporaryRedirectionCanBePerformedWhenAccessingPageOldFriendlyURL 
        5 The redirection type can be configured as permanent in the instance settings  NO  FriendlyURLService#PermanentRedirectionCanBePerformedWhenAccessingPageOldFriendlyURL
        4 Temporary redirection can be performed when accessing the old friendly URL of a page.  NO FriendlyURLService#TemporaryRedirectionCanBePerformedWhenAccessingPageOldFriendlyURL 
        4 Permanent redirection can be performed when accessing the old friendly URL of a page.  NO FriendlyURLService#PermanentRedirectionCanBePerformedWhenAccessingPageOldFriendlyURL 
        4 Temporary redirection can be performed when accessing the old friendly URL of a blog entry displayed with a display page template.  NO  Manual 
        4 Permanent redirection can be performed when accessing the old friendly URL of a blog entry displayed with a display page template.  NO Manual 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              austin.chiang Austin Chiang
              Reporter:
              pablo.agulla Pablo Agulla
              Engineering Assignee:
              Adolfo Pérez
              Recent user:
              Rubén Heras
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.3.X
                  7.4.3.31 CE GA31
                  7.4.13 DXP U31
                  Master