Rewrite URL's Glype (nginx)

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] 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[/code]`

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[/url] but I'm not sure if they are using Glype)[/url]
```

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct