0

I have this rewrite rule:

RewriteRule ^([^/]+)(/.*.(js|css))$ ../../lib/minify/m.php?f=$2&d=$1

This is used on URLS like that:

1393435108/js/prototype/prototype.js,/js/prototype/window.js./,/js/scriptaculous/builder.js,/js/scriptaculous/effects.js,/js/scriptaculous/dragdrop.js,/js/scriptaculous/controls.js,/js/scriptaculous/slider.js,/js/lib/ccard.js,/js/prototype/validation.js,/js/varien/js.js,/js/mage/translate.js,/js/mage/adminhtml/hash.js,/js/mage/adminhtml/events.js,/js/mage/adminhtml/loader.js,/js/mage/adminhtml/grid.js,/js/mage/adminhtml/tabs.js,/js/mage/adminhtml/form.js,/js/mage/adminhtml/accordion.js,/js/mage/adminhtml/tools12345.js

I put that into an online regex tester: http://regex101.com/r/rX8lJ8

As we can see from the rewrite rule, it uses $2 and $1, which can be seen in the regex tester. $1 resolves to 1393435108 and $2 resolves to the files.

Now, when I debug m.php which takes those 2 parameters, only $_GET['d'] is filled with the number 1393435108, which is correct. $_GET['f'] is not even there.

The question is, why is it not filled correctly? Is it too long maybe? Another thing I noticed is, that it is working on my local machine, but not on the server, so I guess its some server setting, but I dont know where to start looking.

It works by the way, when I remove the "12345" from the last file.

Can anyone point me in the right direction?

Thanks!

user1856596
  • 7,027
  • 10
  • 41
  • 63

0 Answers0