[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #18893 [Metrics/Globe]: Redirect Globe requests to Atlas



#18893: Redirect Globe requests to Atlas
-------------------------------+------------------
     Reporter:  karsten        |      Owner:  isis
         Type:  enhancement    |     Status:  new
     Priority:  Medium         |  Milestone:
    Component:  Metrics/Globe  |    Version:
     Severity:  Normal         |   Keywords:
Actual Points:                 |  Parent ID:
       Points:                 |   Reviewer:
      Sponsor:                 |
-------------------------------+------------------
 Quoting Tim, isis, and Lunar from tor-project@:

 ''Tim'': Can we redirect globe.torproject.org to atlas.torproject.org?

 ''isis'': We could probably do this without so much effort, yes.  For
 fingerprints the redirect would be from e.g.:

 https://globe.torproject.org/#/relay/A10C4F666D27364036B562823E5830BC448E046A
 to
 https://atlas.torproject.org/#details/A10C4F666D27364036B562823E5830BC448E046A

 For searches it would be:

 https://globe.torproject.org/#/search/query=noether to
 https://atlas.torproject.org/#search/noether

 ''Lunar'': As far as I understand web technologies, the anchor is not sent
 to the HTTP server. So the rewriting can only be done via JavaScript and
 not through Apache.

 ''Suggestion'': How's this code?  (Please improve, this is the result of
 ten minutes searching on the internets!)

 {{{
 <html>
 <body>
 <script type="text/javascript">
 (function () {
     var atlas = "https://atlas.torproject.org/";
     var hash = window.location.hash.substring(1);
     if (!hash) {
         window.location.replace(atlas);
     } else if (hash.startsWith("/relay/")) {
         window.location.replace(atlas + "#details/" + hash.substring(7));
     } else if (hash.startsWith("/search/query=")) {
         window.location.replace(atlas + "#search/" + hash.substring(14));
     } else {
         window.location.replace(atlas);
     }
 })();
 </script>
 </body>
 </html>
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18893>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs