Berkeley CSUA MOTD:2010:March:08 Monday <Sunday, Tuesday>
Berkeley CSUA MOTD
2010/3/8-30 [Industry/Startup] UID:53744 Activity:nil
3/8     Hey guys, Piaw Na's book is ready! I got a copy and it's pretty
        informative and inspiring. Worth every penny.   -CSUA startup dude
        \_ He worked at 3 successfule pre-IPO statups.  Does anyone know how
           much his net worth is roughly?
           \_ I am pretty sure that 90% of his net worth comes from Goog,
              so you can pretty safely discount the rest.
           \_ why does it matter to know? would it help you in any way?
              \_ No.  I just want to see how much better other people do than
                 I.  -- PP
2010/3/8-30 [Computer/SW/Unix] UID:53745 Activity:nil
3/8     I have a mod_rewrite question that I think should be straight-
        forward but I think I'm not getting something.

        I have a virtual server with some root, say /home/user/public_html/
        and in there I have two subdirs, say /app1/ and /app2/
        and i want the following:
        http://mysite/app1   -->   /home/user/public_html/app1
        http://mysite/(.*   -->   /home/user/public_html/app2/$1
        so for ex, http://mysite/app2   -->   /home/user/public_html/app2/app2

        So anything that's not "app1" would map into the app2 subdir ...
        but I guess this causes an infinite loop in the processing? Since it
        just keeps prefixing /app2/ onto the path until it crashes? any
        advice? thx -
        \_ IIRC it matches in order. However, the way you have it, it looks like
           http://mysite/app1 or http://mysite/app1/(.* might not be matched by
           your first rule. Perhaps "http://mysite/app1(/.*)?" or something may
           work better (untested though, but you should get the idea)
           \_ ok sure you're right. But my main question is how to get the
              2nd rule to work w/out generating an infinite loop. ie,
              http://mysite      should go to  home/user/public_html/app2/
              http://mysite/foo  should go to  home/user/public_html/app2/foo
              http://mysite/app2 should go to  home/user/public_html/app2/app2
              etc, but w/out infinite loop. possible? thx
                  \_ Oh, I see. You probably want
                     http://mysite/app2 -> /home/user/public_html/app2/
                         as a separate rule, or perhaps...
                         http://mysite/([^/]*)(/.*?) -> /home/user/public_html/app2/$1$2
                         ...maybe? I don't know why it would be rewriting it to a path on
                         your's been a while, but I thought it rewrote
                         URLs, not filesystem paths. I'm just guessing...
        \_ set your root to app2. then alias /app1. no mod_rewrite.
           \_ hurr durr that would make too much sense. D'oh. --!op
2010/3/8-30 [Politics/Domestic] UID:53746 Activity:nil
        "Yay, I'm libural, therefore, I must be guy."
Berkeley CSUA MOTD:2010:March:08 Monday <Sunday, Tuesday>