<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thanks for all the replies - I've not been ignoring you, I'm just in
    a different timezone!<br>
    <br>
    <div class="moz-cite-prefix">On 10/14/2015 03:16 AM, Patrick
      Nommensen wrote:<br>
    </div>
    <blockquote
cite="mid:CALPgkDAxkZnb0ECrXQUtkLxR1QBLFKU0Hkq23z3t9cR2ASb9Eg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Tue, Oct 13, 2015 at 6:09 AM,
            Andrew Hutchings <span dir="ltr"><<a
                moz-do-not-send="true"
                href="mailto:ahutchings@nginx.com" target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:ahutchings@nginx.com">ahutchings@nginx.com</a></a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi!<br>
              <span class=""><br>
                On Tuesday 13 October 2015 08:59:02 steve wrote:<br>
                > Hi folks,<br>
                ><br>
                > I have a requirement from a customer that the
                terminal slash be<br>
                > rewritten when accessing the homepage - eg <a
                  moz-do-not-send="true" href="http://example.com/"
                  rel="noreferrer" target="_blank">example.com/</a> is a
                301 to<br>
                > <a moz-do-not-send="true"
                  href="http://example.com" rel="noreferrer"
                  target="_blank">example.com</a><br>
                ><br>
                > I've tried a simple rewrite of ^/$ but that just
                loops.<br>
                ><br>
                > Any ideas?<br>
                <br>
              </span>As you have seen in other answers this will be
              pretty much impossible to get<br>
              right. Have you considered writing some Javascript to do
              it client side<br>
              instead? Something like this:<br>
              <br>
              <a moz-do-not-send="true"
href="http://stackoverflow.com/questions/10953792/change-url-in-browser-address-bar-without-reload-existing-page"
                rel="noreferrer" target="_blank">http://stackoverflow.com/questions/10953792/change-url-in-browser-address-bar-without-reload-existing-page</a><br>
              <br>
              At least then (in theory) you can have the illusion of
              hiding the trailing<br>
              slash without risking breaking browser support for the
              site.<br>
            </blockquote>
            <div><br>
            </div>
            <div>You can set a canonical URL if your intention is for
              SEO. This is the standard practice. </div>
            <div><br>
            </div>
            <div><a moz-do-not-send="true"
                href="https://moz.com/learn/seo/canonicalization">https://moz.com/learn/seo/canonicalization</a> <br>
            </div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
              Kind Regards<br>
              <span class=""><font color="#888888">--<br>
                  Andrew Hutchings (LinuxJedi)<br>
                  Senior Developer Advocate, NGINX Inc.<br>
                </font></span>
              <div class="">
                <div class="h5"><br>
                  _______________________________________________<br>
                  nginx mailing list<br>
                  <a moz-do-not-send="true"
                    href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
                  <a moz-do-not-send="true"
                    href="http://mailman.nginx.org/mailman/listinfo/nginx"
                    rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
                </div>
              </div>
            </blockquote>
          </div>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
    </blockquote>
    <br>
    As can be seen from the google article, it's apparently a bad
    thing(tm) to duplicate content for example.com/ and example.com.
    Apparently some .htaccess tweak can do a 301 redirect from one to
    the other, but absolutely nothing that has been suggested ( or
    others that allegedly work - like redirecting ^/(.*)/ ) does
    actually work with nginx, which is exactly what I expected to
    happen.<br>
    <br>
    The CMS ( it's Magento but that doesn't really make a difference )
    rewrites the URL to the value stored in the database anyway,  but
    the 'problem' is that it doesn't redirect.<br>
    <br>
    As has been suggested, this is a complete non-event, as every page
    contains a canonical header entry anyway! Have suggested that client
    engages other SEO 'consultants'.<br>
    <br>
    Now need to wash the snake oil out of my head (:<br>
    <br>
    Thanks for your help.<br>
    <br>
    Steve<br>
    <pre class="moz-signature" cols="72">-- 
Steve Holdoway BSc(Hons) MIITP
<a class="moz-txt-link-freetext" href="http://www.greengecko.co.nz">http://www.greengecko.co.nz</a>
Linkedin: <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/steveholdoway">http://www.linkedin.com/in/steveholdoway</a>
Skype: sholdowa</pre>
  </body>
</html>