Rewrite URL's Glype (nginx)
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]
Example: If I go to /browse on The Pirate Bay on my proxy I want to convert the URL from this:
[code]http://proxy.com/tpb/browse.php?u=http%3A%2F%2Fthepiratebay.se%2Fbrowse&b=0
To this:
~~[code]~~http://proxy.com/tpb/browse<e>[/code]</e>
Also if i go to:
~~[code]~~http://proxy.com/tpb/browse.php?u=http%3A%2F%2Fthepiratebay.se%2Ftop&b=0<e>[/code]</e>
Then I want to convert to:
~~[code]~~http://proxy.com/tpb/top<e>[/code]</e>
As you can see, the whole part:
~~[code]~~browse.php?u=http%3A%2F%2Fthepiratebay.se%2F<e>[/code]</e>
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:
~~[code]~~location /tpb/ {
rewrite ^/browse.php?u=(.*)$ /$1? last;
break;
}<e>[/code]</e>
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 [url]tpb.piratenpartij.nl
```