Discussion:
IIRF ReWrite Rules for Zend Framework on IIS
drj201
2009-01-22 13:41:44 UTC
Permalink
Hello,

Does anyone use IIRF with Zend Framework and IIS?

I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.

So far I have the following in my IsapiRewrite4.ini:

RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]

This works fine EXCEPT when making any HTTP GET requests such as:

http://www.example.com/search?query=myquery

The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.

The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.

Can anyone help me please?

Regards,

David
--
View this message in context: http://www.nabble.com/IIRF-ReWrite-Rules-for-Zend-Framework-on-IIS-tp21604335p21604335.html
Sent from the Zend Framework mailing list archive at Nabble.com.
Matthew Weier O'Phinney
2009-01-22 14:14:02 UTC
Permalink
Post by drj201
Does anyone use IIRF with Zend Framework and IIS?
I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.
RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]
http://www.example.com/search?query=myquery
The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.
The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.
Can anyone help me please?
There's an example in the Zend_Controller docs for use with IIS 7.0
(which has a native rewrite implementation):

http://framework.zend.com/manual/en/zend.controller.html

Can't help you much with IsapiRewrite, however.
--
Matthew Weier O'Phinney
Software Architect | matthew-C1q0ot2/***@public.gmane.org
Zend Framework | http://framework.zend.com/
Bryce Lohr
2009-01-22 14:14:26 UTC
Permalink
About two years ago, I was running ZF with IIRF. I had the same problem
with it not propagating the GET parameters. I hacked the IIRF code to
get it to pass the GET parms the same way IsapiRewrite does. I can give
you the code if you're interested, however, I haven't actually used it
in more than a year and a half, so I don't know if it'll still work
properly. I haven't kept up with any newer versions of IIRF (the project
had seemed to die right about the time I was doing this).

Regards,
Bryce Lohr
Post by drj201
Hello,
Does anyone use IIRF with Zend Framework and IIS?
I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.
RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]
http://www.example.com/search?query=myquery
The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.
The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.
Can anyone help me please?
Regards,
David
Jason Webster
2009-01-22 17:00:45 UTC
Permalink
There's a section here <http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter>
on using IIRF. I cannot verify if it is accurate or correct, but it's worth a shot.
Post by Bryce Lohr
About two years ago, I was running ZF with IIRF. I had the same problem
with it not propagating the GET parameters. I hacked the IIRF code to
get it to pass the GET parms the same way IsapiRewrite does. I can give
you the code if you're interested, however, I haven't actually used it
in more than a year and a half, so I don't know if it'll still work
properly. I haven't kept up with any newer versions of IIRF (the project
had seemed to die right about the time I was doing this).
Regards,
Bryce Lohr
Post by drj201
Hello,
Does anyone use IIRF with Zend Framework and IIS?
I am using IIS6 and I am having great difficulty creating the correct
rewrite rules for IIRF that will work with Zend Framework.
RewriteRule ^/(.*(js|ico|gif|jpg|png|flv|swf|css))$ /$1 [L,I,U]
RewriteRule ^(.*)$ /index.php [L,I,U]
http://www.example.com/search?query=myquery
The contents of $_GET are blank yet it is fine on Apache. My rule is
incorrect.
The example given in the Zend Wiki
(http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter)
is far far too simplified and I have found little to nothing elsewhere.
Can anyone help me please?
Regards,
David
Loading...