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.

Archive /

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

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

Rewrite rules for lighttpd


Go to End
Reply


9 Posts   14370 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