Hi all,
I’ve a Glype proxy and I want to rewrite the URL’s. All URLs on the page
are automatically converted to:
http://proxy.com/browse.php?u=URL HERE
Example: If I go to /browse on The Pirate Bay on my proxy I want to
convert the URL from this:
http://proxy.com/tpb/browse.php?u=http%3A%2F%2Fthepiratebay.se%2Fbrowse&b=0
To this:
http://proxy.com/tpb/browse
Also if i go to:
http://proxy.com/tpb/browse.php?u=http%3A%2F%2Fthepiratebay.se%2Ftop&b=0
Then I want to convert to:
http://proxy.com/tpb/top
As you can see, the whole part:
browse.php?u=http%3A%2F%2Fthepiratebay.se%2F
Is gone (and the &b=0
what is behind the URL). And it has the same
domain structure as The Pirate Bay.
I’ve tried something like this, in the .htaccess file:
location /tpb/ {
rewrite ^/browse.php?u=(.*)$ /$1? last;
break;
}
But it is not working. Somebody has an answer? An other function is also
welcome. (Such as fastcgi_split_path_info
or something else what is
compatible with nginx)
(If you want see a example go to tpb.piratenpartij.nl but I’m not
sure if they are using Glype)