lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Le 8 janv. 2014 à 12:18, Rv Rv <rvrv7575@yahoo.com> a écrit :

Hello 
I am beginning to use lua especially with nginx. I need to rewrite the URLs *within* the html page.The lua html parser at  https://github.com/wscherphof/lua-htmlparser provides the URL but as far as I understand from its documentation, it will not rewrite the URL. I can perhaps reconstruct the page but was wondering if there is already a tool that would do that

Thanks for any inputs

Hi,

I wouldn't use a parser for that, just regular expressions with string.gsub() and maybe my url library at https://github.com/golgote/neturl if you want to modify the original url easily.

--
Bertrand Mansion
Mamasam