rook equivalent for .htaccess

39 views
Skip to first unread message

carrier...@gmail.com

unread,
Oct 15, 2013, 1:45:27 PM10/15/13
to rr...@googlegroups.com
Hello,

first of all a big thank for this great and simple to use package to Jeffrey Horner.
I was wandering: how do I have access to certain low level configurations like telling the server the content type of the requested files in the header? To give an example having a .htaccess file I could do 

AddType text/css .css

Thanks again,
Michele.

Michele

unread,
Oct 17, 2013, 1:13:31 PM10/17/13
to rr...@googlegroups.com
Just to give an idea of the problem I'm having please have a look at the attachment screen print.

Thanks,
Michele.
rook.png

Jeffrey Horner

unread,
Oct 17, 2013, 1:51:25 PM10/17/13
to rr...@googlegroups.com
Can you post your code somewhere for us?


--
You received this message because you are subscribed to the Google Groups "rRook" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rrook+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Michele

unread,
Oct 18, 2013, 5:26:28 AM10/18/13
to rr...@googlegroups.com

Hi!

yes, sure. I've a config.R


library(Rook)

myPort <- 80
myInterface <- "192.168.16.81"
.Call(tools:::startHTTPD, myInterface, myPort)
unlockBinding("httpdPort", environment(tools:::startDynamicHelp))
assign("httpdPort", myPort, environment(tools:::startDynamicHelp))

s <- Rhttpd$new()
s$listenAddr <- myInterface
s$listenPort <- myPort

app <- Builder$new(
  Static$new(
    urls = c("/UI/js", "/UI/css", "/UI/images"),
    root = "."
  ),
  Brewery$new(
    url="/UI/R",
    root="."),
  Redirect$new("/UI/R/index.html")
)

s$add(
  app=app,
  name="Administration"
)

The beginning of the index.html file is the following:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Administration</title>
    <link rel="icon" type="image/png" href="../images/Evolve Logo2.png" />
    
    <link rel="stylesheet" type="text/css"  href="../css/DashboardStyles.css"/>
    <link rel="stylesheet" type="text/css"  href="../css/jquery.jscrollpane.css" />
    
    <script type="text/javascript" src="../js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="../js/jquery.jscrollpane.min.js"></script>
    <script type="text/javascript" src="../js/jquery.mousewheel.js"></script>
.....
.....
</html>
Reply all
Reply to author
Forward
0 new messages