Skip to content

iis module

Tatsuro Shibamura edited this page Jun 27, 2015 · 6 revisions

iis module.

Reference

iis.debug

-- call Win32 API OutputDebugString
iis.debug("debug message")

iis.exec

-- execute another page
if iis.req.get_url() == "/" then
   iis.exec("/another_page")
end

iis.exit

-- return 404 not found
iis.exit(404)

iis.flush

-- flush buffering content
iis.flush()

iis.headers_sent

if iis.headers_sent()
    iis.debug("already sent response headers")
end

iis.map_path

-- map to physical path
physicalPath = iis.map_path("/")
iis.debug(physicalPath)

iis.print

-- write to response body
iis.print("hello, world")

iis.redirect

-- redirect to url (default: 302)
iis.redirect("http://buchizo.wordpress.com/")

-- 301 redirect
iis.redirect("http://buchizo.wordpress.com/", 301)

iis.say

-- write with newline
iis.say("hello, world")
iis.say("newline")

Clone this wiki locally