Project

General

Profile

Bug #1791

url.rewrite Problem

Added by Anonymous almost 11 years ago. Updated almost 11 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
mod_rewrite
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

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

History

#1

Updated by stbuehler almost 11 years ago

  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")
#2

Updated by Anonymous almost 11 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",
#3

Updated by stbuehler almost 11 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.

#4

Updated by Anonymous almost 11 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?

#5

Updated by darix almost 11 years ago

how about

"^/magazin/artikel/([0-9]*),([0-9]*),([0-9]*),([0-9]*),([0-9]*),?(.*)(/.*)*"

#6

Updated by stbuehler almost 11 years ago

  • Status changed from Fixed to Invalid

Also available in: Atom