directory access without trailing slash doesn't work after 3.3.9

ts77

Well-Known Member
#5
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.
 

ts77

Well-Known Member
#7
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.
 

mistwang

LiteSpeed Staff
#8
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.
 
Top