directory access without trailing slash doesn't work after 3.3.9

Discussion in 'Bug Reports' started by ts77, Apr 29, 2008.

  1. ts77

    ts77 Well-Known Member

    Hi folks,

    I just found that directory access like
    doesn't work anymore with any version after 3.3.9, meaning it returns a 404 error.
    I don't know if its just not calling the directory index or whatever but I always
    had to call
    to get the wanted content.

    For now I had to go back to 3.3.9 to avoid this problem.


  2. ts77

    ts77 Well-Known Member

    is that being taken care of for the next release or am I just too stupid to use a cool feature?
  3. PSS

    PSS Well-Known Member

    Last edited: May 5, 2008
  4. mistwang

    mistwang LiteSpeed Staff

    Sorry, forgot to update this thread.
    Yes, it should have been fixed in 3.3.11
  5. ts77

    ts77 Well-Known Member

    hmm, just tested again with 3.3.11 with the same result.
    digging deeper it seems to be a change in the mod rewrite handling.

    there are cakephp rules in the .htaccess in that directory which lead to the following (from the error log with mod rewrite logging):

    Access with
    www.domainname/the_given_directory :
    2008-05-07 15:16:42.556 [INFO] [xxx:14858-0#domainname] [REWRITE] Rule: Match '/the_given_directory' with pattern '(.*)pages/(.*)/foo', result: -1
    2008-05-07 15:16:42.556 [INFO] [xxx:14858-0#domainname] [REWRITE] Source URI: '/the_given_directory' => Result URI: 'app/webroot/the_given_directory'

    Access with
    www.domainname/the_given_directory/ :
    2008-05-07 15:17:42.564 [INFO] [xxx:14970-0#domainname] [REWRITE] Rule: Match '' with pattern '(.*)pages/(.*)/foo', result: -1
    2008-05-07 15:17:42.564 [INFO] [xxx:14970-0#domainname] [REWRITE] Source URI: '' => Result URI: 'app/webroot/'

    see the directory given as parameter in the first request?
    I guess these two requests should be handled fully the same and I think the second way is the correct one.
  6. mistwang

    mistwang LiteSpeed Staff

  7. ts77

    ts77 Well-Known Member

    well, no magic involved, just tried with a default install.
    enabled rewrite and .htaccess, put the htaccess into a directory, tried access with (second) and without / (first):

    2008-05-07 15:58:31.714 [INFO] [xxx:19511-0#Example] [REWRITE] Rule: Match '/test/cake_1.1.19.6305' with pattern '^$', result: -1
    2008-05-07 15:58:31.714 [INFO] [xxx:19511-0#Example] [REWRITE] Rule: Match '/test/cake_1.1.19.6305' with pattern '(.*)', result: 2
    2008-05-07 15:58:31.714 [INFO] [xxx:19511-0#Example] [REWRITE] Source URI: '/test/cake_1.1.19.6305' => Result URI: 'app/webroot/test/cake_1.1.19.6305'
    2008-05-07 15:58:31.714 [INFO] [xxx:19511-0#Example] [REWRITE] Last Rule, stop!
    2008-05-07 15:58:33.682 [INFO] [xxx:19511-1#Example] [REWRITE] strip base: '/test/cake_1.1.19.6305/' from URI: '/test/cake_1.1.19.6305/'
    2008-05-07 15:58:33.682 [INFO] [xxx:19511-1#Example] [REWRITE] Rule: Match '' with pattern '^$', result: 1
    2008-05-07 15:58:33.682 [INFO] [xxx:19511-1#Example] [REWRITE] Source URI: '' => Result URI: 'app/webroot/'

    you see the same behaviour.
  8. mistwang

    mistwang LiteSpeed Staff

    I see. The first request should be redirect to the second one, should not go through the rewrite rule in .htaccess at all. I probably know what is the problem. will address it soon.
  9. ts77

    ts77 Well-Known Member

    thanks. looking forward to it.
  10. mistwang

    mistwang LiteSpeed Staff

    OK, please download and try 3.3.12 release package, just change the version number in the download link.
  11. ts77

    ts77 Well-Known Member

    seems to work, thx.

Share This Page