Forum Moderators: phranque

Message Too Old, No Replies

Some Help with mod_rewrite?

Some Help with mod_rewrite?

         

iammazz

9:13 pm on May 4, 2005 (gmt 0)



Hi,

I'm relatively new to mod_rewrite, so I'd like to have some help with this. I hope to learn the ins and outs of it eventually, but this would be very nice to have now.

What I'd like to do is this. I have a content filtering system that I'd like to use mod_rewrite to circumvent. When I type in a site that's been blocked, this is what I see:

 http://10.10.100.190/ContentFiltering/Tam_Blocked.aspx?DOMAIN=myspace.com&CATEGORY=local-block&OBJ=Content%20Filtering 

That comes up for a request to go to [myspace.com....]

What I've noticed is that if I go through a proxy, this 10.10.100.190 gets looked for on the network of the server through which I'm proxying.

What I want to do is use mod_rewrite to translate this to the destination page. I will set up a server on the same network as the proxy machine to be at 10.10.100.190. I'd like for requests to be passed from the proxy server to that server, and for that to translate it to the original site.

Is this doable using mod_rewrite? Is there another way to better do this?

Thanks so much!

Please also note: I'm not trying to surf porn or anything. I've found the filters to be extremely limiting, and they prevent me from doing a large amount of research.

sitz

11:53 pm on May 4, 2005 (gmt 0)

10+ Year Member



mod_proxy is likely going to be the way to go, if you want a proxy-based solution. Read the docs at [httpd.apache.org ] for more info.

The other way to run this is to do ssh port-forwarding (you'll need shell access on a remote host and a proxying application running there) with a unix ssh client or (for windows) Putty [chiark.greenend.org.uk]. If you run a proxy application on a remote host on, say, port 3128, you can then port-forward localhost:3128 to remotehost:3128 and configure your browser to use localhost:3128 as the proxy. This effectively tunnels your HTTP/HTTPS traffic over ssh.

jestershinra

12:12 am on May 5, 2005 (gmt 0)

10+ Year Member



...this is me. I didn't realize i'd already registered.

Thanks very much. I'll look into those.

As far as the SSH tunneling...how would I redirect localhost:portnumber to remotehost:portnumber?

jestershinra

12:33 am on May 5, 2005 (gmt 0)

10+ Year Member



Well, I don't know where the edit is here so I'll just post again...

...I figured that last bit out.

Thanks again!