Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-07-2008, 07:31 PM
Junior Member
 
Join Date: Mar 2008
Posts: 4
Question Rewrite router question - matching locations ending with 'javascript.js'

Hi all,

I am trying to write a custom route that would detect "javascript.js" at the end of URLs and pass custom value generateJavascript=1 to whatever controller it matched.

In all URL examples below, respective controllers should be passed generateJavascript=1 by the router:

mysite.com/javascript.js
mysite.com/controlpanel/javascript.js
mysite.com/controlpanel/useraction/javascript.js .....and so on.

The only thing I could come up with was:

route.test.type = "Zend_Controller_Router_Route_Regex"
route.test.route = "((??!javascript\.js).){0,})/javascript\.js"
route.test.defaults.generateJavascript = 1

But it does not work because controller/action are not captured.

Your help is greatly appreciated.

Temuri
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 05:34 AM.