Project

General

Profile

Actions

Bug #1791

closed

url.rewrite Problem

Added by Anonymous about 16 years ago. Updated about 16 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_rewrite
Target version:
ASK QUESTIONS IN Forums:

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

Actions #1

Updated by stbuehler about 16 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")
Actions #2

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",
Actions #3

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.

Actions #4

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?

Actions #5

Updated by darix about 16 years ago

how about

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

Actions #6

Updated by stbuehler about 16 years ago

  • Status changed from Fixed to Invalid
Actions

Also available in: Atom