Lighttpd info

Rewrite rules:

https://stackoverflow.com/questions/5059860/lighttpd-url-rewrite

 

Add a rule specifically for paths with a trailing slash:

url.rewrite = (
  "^/framework([^?]*/)(\?.*)?$" => "/framework$1index.php$2",
  "^/framework/([^?]*)(\?.*)?$" => "/framework/$1.php$2"
)

And here’s a breakdown of how the regular expression works:

^          // Match the beginning of the string
/framework // Match any string starting with "/framework"
(          // Open the first group ($1 in the right hand side)
  [^?]*    // Match zero or more characters that are not '?'
  /        // Ending in '/'
)          // Close the first group
(          // Open the second group ($2)
  \?       // Match a '?'
  .*       // Match zero or more characters
)          // Close the second group
?          // Match the second group exactly once or not at all
$          // Match the end of the string