Re: Setting up single-site anonymizer?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesse Sheidlower wrote:
On Mon, May 19, 2008 at 10:39:24AM -0700, Thibaut Colar wrote:

Jesse Sheidlower wrote:

  
Basically, what I'm trying to accomplish is this: I host a
website, say http://www.mysite.com, and a specific group
of users need to access a specific other site, say
http://www.othersite.com anonymously. Content from
othersite.com may include cookies, JS, and so forth. I'd
like to set it up so that my users can go to, say,
http://www.mysite.com/othersite and just seamlessly browse
othersite.com; situations where the users need to change
their proxy settings will not work for a variety of
reasons (including that these are highly non-technical
users, and that there are other proxies in use that can't
be changed).

Can someone suggest the best way to accomplish this? I
looked at mod_proxy_html, but was unable to get this set
up as easily as I had hoped. If it's the right solution,
I'll try harder, or post to its list for help. But given
the fact that there are public anonymizers all over the
place, I would have thought this is a fairly
straightforward task. But I haven't been able to find a
good discussion of how to do this.
      
You should be able to easily accomplish what you want like this:

In your somesite.conf add:

RewriteRule ^/othersite/(.*) http://othersite/$1 [P]

This uses mod_rewrite, as a proxy (the [P] telles it to proxy the request)
    

Thanks. There seem to be two problems with this:

First, when I enter something into a search box on
othersite.com, the URL I get back is on mysite.com but without
"othersite", e.g.  instead of getting
http://www.mysite.com/othersite/search?foo=bar I get
http://www.mysite.com/search?foo=bar, which gives me a 404
because I need to be at "othersite" for this.
  
You can solve this by using a third level domain on your site:

http://othersite.mysite.com

and proxying everything that comes to that domain (using mod rewrite):

RewriteRule ^/(.*) http://othersite/$1 [P]

Second, the links on the returned page are all to
othersite.com.  So if I have a result that looks like
http://www.othersite.com/catalog/343, that's the link, period,
and clicking on it will skip my proxy. What I need is the link
to look like http://www.mysite.com/othersite/catalog/343 

Is this possible with mod_rewrite, or do I need a more
elaborate solution?
  

I believe this problem is caused by faulty links on othersite. They ought to be internal links and apparently are external links. If they were internal links the user's browser would build a complete url from them using your site rather than othersite.

i.e. the anchor link on the page at othersite should be <a href='' > but apparently is <a href='' >

John Hicks



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux