[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [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 | Resolution:
Keywords: | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------+----------------------
Comment (by iang):
Replying to [comment:1 saint]:
> If you are planning to continue using Apache, it's possible to do this
with `mod_rewrite` (even with anchors). For anchor links, it requires the
`NE` flag with a 301 http code. This will keep Apache from converting #
into its hex equivalent.
>
> So something like:
> {{{
> RewriteEngine On
>
> RewritÂeCond %{HTTPÂ_HOST} ^globe.torproject.org/#/relay/(.*)$ [NC]
> RewriteRule ^atlas.torproject.org/#details/$1[NE,R=301]
>
> RewritÂeCond %{HTTPÂ_HOST} ^globe.torproject.org/#/search/query=(.*)$
[NC]
> RewriteRule ^atlas.torproject.org/#search/$1[NE,R=301]
>
> }}}
>
> should work.
I'm pretty sure the NE trick is for rewriting *to* a URL with an anchor.
But Apache will never see the *original* anchor, as Lunar points out
above.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18893#comment:3>
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