Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Rewrite rules for lighttpd


Go to End


9 Posts   16465 Views

Avatar
robvdl

Community Member, 5 Posts

4 June 2008 at 6:58pm

Edited: 04/06/2008 7:09pm

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

Go to Top