Results 1 to 4 of 4
  1. #1

    Lighttpd Rewrite - need help badly!

    I need to accomplish:

    http://www.domain.com/sub/* ==> http://sub.domain.com/* however it should be proxied so that the user never sees http://sub.domain.com/

    This is because the sub domain is using apache while www is using lighttpd and I want to keep the entire site with www to the user.

    Thanks

  2. #2
    Join Date
    Oct 2004
    Location
    Kerala, India
    Posts
    4,750
    Try the following rule.

    Code:
    $HTTP["host"] =~ "^www.domain\.com$" {
    url.redirect = ( "^/sub/(.*)$" => "http://sub.domain.com/$1")
    }
    David | www.cliffsupport.com
    Affordable Server Management Solutions sales AT cliffsupport DOT com
    CliffWebManager | Access WHM from iPhone and Android

  3. #3
    This will redirect the whole site. I want it to be proxied so the user stays in www.domain.com.

    I read on the internet: http://www.webmasterworld.com/apache/3297088.htm

    rewriteRule ^([^.]+)\.jpg$ http://images.example.com/$1.jpg [P]


    However this is for Apache and I don't know how to do similar in Lighttpd.

    Thanks

  4. #4
    Join Date
    Jun 2006
    Location
    Ahh' UnderPants
    Posts
    1,012
    OMG Its another thread, I must post it in correct thread.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •