https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27009

            Bug ID: 27009
           Summary: Use 301 to redirect from tracklinks.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: OPAC
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

In opac/tracklinks.pl we use a simple redirect to send the user on to the
actual URL, after tracking:

  print $cgi->redirect($uri);

This sends a "302 Moved Temporarily" to the browser as a default. One of our
clients had some SEO work done on their websites, and one of the
recommendations was to use "301 Moved Permanently" instead. This makes some
sense, the URLs we redirect to do not change very often, I guess. 

According to https://metacpan.org/pod/CGI#Generating-a-redirection-header, the
solution is to change the call to redirect() thusly:

  print $q->redirect(
    -uri    => $uri,
    -status => '301 Moved Permanently'
  );

Patch coming.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to