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

New possible optional filter: Redirect Url's extension filter (SEO optimization)

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 5.3.1
    • core
    • Yes

      Magnolia serves the same page with the same URL and various different extensions:

      • URL(without extension) + html
      • URL(without extension) + htm
      • URL(without extension) + any unknown extension
      • URL(without extension) + no extension at all
      • URL(without extension) + / at the end

      This is under certain circumstances not optimal for SEO, as it can result in duplicate content ranking penalties.

      Customer pointing out the problem asked preferably a permanent redirecting solution, where all variations permanent redirect to one version.

      I solved this creating a filter class.
      It could be placed as optional filter into the product.

      It is very comparable to the VirtualURI filter class, using the dispatcher tool to dispatch the request if needed.

      Generally:
      The filter permanently redirects any incoming URL matching a configured extension to the same URL 1:1 with the target extension. For examples:
      http://demopublic.magnolia-cms.com/demo-project to http://demopublic.magnolia-cms.com/demo-project.html
      http://demopublic.magnolia-cms.com/demo-project.dingsda -> http://demopublic.magnolia-cms.com/demo-project.html

      What you can configure -> hat it does:

      • enabled -> self explaining
      • defaultExtension -> the default extension defining the target extension for all changes
      • useServerDefaultExtension -> instead of the "defaultExtension" using the configured server defaultExtension defined in config:/server@defaultExtension
      • redirectType -> type of rediect. Default 'permanent', second possibility 'redirect'
      • proibitedLeadPatterns (collection) -> any lead pattern of the url that should be ignored
      • redirectExtensions (collection) -> explicit extensions that should be changed to the 'defaultExtension'
      • redirectWithoutExtension -> redirecting when no extension exists or is '/' of '.'
      • redirectUnknownExtension -> redirecting any extension that does not map a MIME type defined in config:/server/MIMEMapping

      Target place in filter chain:

      • Before cache

      Additional work required:

      • test cases
      • javadoc
      • probably some refactoring & renaming

        Acceptance criteria

              Unassigned Unassigned
              cringele Christian Ringele
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:

                  Task DoD