Reading $_GET from URL

Hi! Is it possible to read and send values from GET array which are comming from the url via web proxy? For example, user goes to the url “domain.com/script.php?smth=value”. I want to redirect him via web proxy to another website with the same parameters.

If you depend on the values of the parameters, then the only way I can think of is with a transparent web proxy, as opposed to a “normal” MikroTik web proxy…

Do a dst-nat of the web site’s IP, and nat it to a web server of yours. On that web server, redirect all request to a single (let’s say PHP) file, and manipulate them as you see fit. Anything that should remain unchanged should make the web server send a new HTTP request to the “real” web server, and forward the response back to the client.

This approach can be very taxing from a user’s perspective though, since it’s almost like generating the entire web page twice - the normal penalty users encounter once, and that same penalty a second time on your web server.



If your only real criteria is the original hostname, then you can simply use the “/ip proxy direct” menu, and specify the local and dst addresses accordingly.