Bug #1791
closedurl.rewrite Problem
Description
Hi,
after updating fom 1.4.19 to 1.4.20 the following rewrite rule does not match anymore:
"^/foo/bar/([0-9]*),([0-9]*),([0-9]*),([0-9]*),([0-9]*),?(.*)/(.*)/(.*)" => "/foo.php?type=test&sub_type=text&rwid1=$1&rwid2=$2&rwid3=$3&rwid4=$4&rwid5=$5&rwid6=$6",
but the match is handeld by
"^/foo/" => "/foo.php?type=source&kunde_id=0&kategorie_id=0&artikel_id=0&source_name=navigation",
with > 1.4.19 everything works well.
-- am
Updated by stbuehler about 16 years ago
- The urls are now sanitized/urldecoded before matching. perhaps you should post which url(s) you try to match
- your regex looks broken - ".*" matches "/"s too.
- you really should parse such things in your php file, so it is less pain to move your app to other webservers (i.e. rewrite with something like this "^/foo/(.*)" => "/foo.php/$1")
Updated by Anonymous about 16 years ago
Replying to stbuehler:
1. The urls are now sanitized/urldecoded before matching. perhaps you should post which url(s) you try to match
2. your regex looks broken - ".*" matches "/"s too.
3. you really should parse such things in your php file, so it is less pain to move your app to other webservers (i.e. rewrite with something like this "^/foo/(.*)" => "/foo.php/$1")
The url which should match is
http://www.chefkoch.de/magazin/artikel/6,0,980,0,2,zutaten/
and the url rewrite is:
"^/magazin/artikel/([0-9]*),([0-9]*),([0-9]*),([0-9]*),([0-9]*),?(.*)/(.*)/(.*)" => "/cms-counter-redirect.php?type=old&sub_type=artikel&rwid1=$1&rwid2=$2&rwid3=$3&rwid4=$4&rwid5=$5&rwid6=$6",
Updated by stbuehler about 16 years ago
- Status changed from New to Fixed
- Resolution set to invalid
You try to match two "/" in the regex after "/magazin/artikel/", but there is only one after "zutaten"; so this regex never matched that url.
Updated by Anonymous about 16 years ago
Replying to stbuehler:
You try to match two "/" in the regex after "/magazin/artikel/", but there is only one after "zutaten"; so this regex never matched that url.
it should match http://www.chefkoch.de/magazin/artikel/6,0,980,0,2,zutaten//
but only http://www.chefkoch.de/magazin/artikel/6,0,980,0,2,zutaten/foo/ works.
and the (.*) should be "something or nothing" am i right?
Updated by darix about 16 years ago
how about
"^/magazin/artikel/([0-9]*),([0-9]*),([0-9]*),([0-9]*),([0-9]*),?(.*)(/.*)*"
Also available in: Atom