Project

General

Profile

Actions

Bug #330

closed

When request directory does not append trailing slash

Added by Anonymous about 19 years ago. Updated about 18 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
-
ASK QUESTIONS IN Forums:

Description

When I request an existing directory (not a virtual one) lighttpd 1.4.6 does not translate url http://www.myserver.com/contact to http://www.myserver.com/contact/ and a blank page is appearing!

If I request http://www.myserver.com/contact/ or a virtual directory (see the follow rewrite rules) everything is OK!

Here is the rewrite rule that may produces the error. Otherwise we have a bug here -)

url.rewrite-once = ("^/server-status(?!no.css).*" => "$0",
"^/(ldp|python|ldp-red|python-red)/(?!index.html|index.php)(.*)" => "$0",
"^/(support|contact|images)/(?!index.html|no.css).*" => "$0",
"^/(a-zA-Z_0-9\-+)(\.rdf)$" => "$1.rdf",
"^/(a-zA-Z_0-9\-+)(\.html)$" => "$1.html",
"^/(a-zA-Z_0-9\-+)(\.php)$" => "$1.php",
"^/(a-zA-Z_0-9\-+)(\.txt)$" => "$1.txt",
"^/(^.\+)/(A-Za-z_0-9\-+)" => "/index.php?q=$1/$2",
"^/(a-zA-Z_0-9\-+)" => "/index.php?q=$1"
)

-- kostas

Actions #1

Updated by Anonymous about 19 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

Solved! Problem comes from regex expression on the following rewrite rule:

Use this
"^/(ldp|python|ldp-red|python-red)/{0,1}(?!no.css).*" => "$0"
instead of
"^/(ldp|python|ldp-red|python-red)/(?!no.css).*" => "$0"

-- kostas

Actions

Also available in: Atom