Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-2589

Remap different possible url to the same while accessing the page

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Major
    • None
    • 4.0
    • None
    • None

    Description

      Currently one page can be accessed in multiple different ways, i.e.:

      For SEO it would be better if first two cases are re-mapped to the third.
      The second case can be mapped using VirtualURIMapping

      class=i.m.cms.beans.config.RegexpVirtualURIMapping
      fromURI=/(.*)/$
      toURI=redirect:/#1.html
      

      Solving the first case using VirtualURIMapping would require mapper intelligent enough to parse the url, figure out if there are any query params. Something along lines of

      class=i.m.cms.beans.config.RegexpVirtualURIMapping
      fromURI=/(.*[^'.html'])(\\?)(.*)
      toURI=redirect:/$1.html$2$3
      

      and for requests without any query params:

      class=i.m.cms.beans.config.RegexpVirtualURIMapping
      fromURI=/([^\\?]*)$
      toURI=redirect:/$1.html
      

      Or possibly combination of the two patterns above into one covering both cases - w/ and w/o query params.
      However since default extension can be configured in admin interface, this mapping should be smart enough to use the default extension rather then blindly mapping everything to html.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                had Jan Haderka
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD