Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Rewrite rules for lighttpd

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2
Go to End
Author Topic: 13921 Views
  • robvdl
    Avatar
    Community Member
    5 Posts

    Re: Rewrite rules for lighttpd Link to this post

    I have simplified it even more, I don't know why I didn't think if this before, but the following solution fixes the problem with mixed case file extensions, .jpg, .JPEG or .JpeG are fully supported now:

    $HTTP["host"] == "yoursite.com" {
    server.document-root = "/home/user/public_html/"
    url.rewrite-once = (
    "(?i)(/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
    "^/(.*?)(\?|$)(.*)" => "/sapphire/main.php?url=$1&$3"
    )
    server.error-handler-404 = "/sapphire/main.php"
    }

    Please note: the forum seems to screw up the spacing in the above code sample, please check the wiki page instead:

    http://doc.silverstripe.com/doku.php?id=installation-on-lighttpd

    13921 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.