Hello,
I need to put a rules on the openwrt that emulate the apache mod-rewrite rule:
RewriteRule http-bind/ http://www.mysite.org:5280/http-bind/ [P]

Given that in the busybox httpd there is not modrewrite features, I was thinking to do that using the LUCI.

The first idea I have is to make a controller that:
-take the request from the client using the source() method [1]
-change some stuff in the html using lua string manipulation functions
-open a tcp connection to the rewrite url and send the manipulated content
-wait the answer, forward back the response to the client (through the write method) and close the socket.

Are there some simpler/better way? (I prefer to do not put lighttpd with the mod-rewrite functionality if I'm not forced :) ).

Thanks,

Lorenzo





[1]http://dev.luci.freifunk-halle.net/luci-doc/modules/luci.http.html


_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users

Reply via email to