Browse Source

Attempted redirect for gitlab.io URLs

Nathan Schneider 5 years ago
parent
commit
66109c9963
1 changed files with 8 additions and 0 deletions
  1. 8 0
      _includes/head.html

+ 8 - 0
_includes/head.html

@@ -11,6 +11,14 @@
   <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
   <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
 
+  <!-- In case users come to medlabboulder.gitlab.io/communityrule -->
+  <script>
+  if (document.URL.indexOf("gitlab.io") >= 0) {
+    var script = '<meta http-equiv="Refresh" content="0; url=https://communityrule.info{{ page.url }}" />';
+    document.head.appendChild(script);
+  }
+  </script> 
+
 <!-- Matomo -->
 <script type="text/javascript">
   var _paq = window._paq || [];