I'm trying to set up a Zend Framework 2 environment without success. I've been following these instructions:
http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html
The one difference is that I'm trying to install it on a Virtual Directory. an example URL would be:
http://localhost/12345678/index/index
I've got to the "Welcome to Zend Framework 2" page by typing:
http://localhost/12345678/index.php/
For some reason that slash at the end is important, otherwise the page won't load and I've no idea why? I would expect the following link to work but it doesn't:
http://localhost/12345678/
Because we have no choice but to use IIS 6, I'm trying to use the Ionics Rewrite filter on the URL, without success. What I've tried so far is:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ index.php [NC,L]
and
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(\d*)/(.*) /$1/index.php/ [L,QSA]
and
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ /12345678/index.php/ [NC,L]
I seem to be able to get to the welcome page and generic 404 error page (not the Zend 404). I can't get to a test controller page or even a zend error page. Can anyone help me find out what RewriteRule to use with the Ionics IIRF.ini file that will allow me to use Zend Framework 2 with virtual directories or point me in the direction of what I'm doing wrong?
Thanks in advance!!!
I've fixed my issue by starting again and following this tutorial, leaving out the Apache stuff:
http://samminds.com/2012/07/zend-framework-2-installation-on-xampp-for-windows/
I'm not entirely sure why it's working but IIS seems to be reading the .htaccess file which is great. Of coarse this has lead me on to other issues but this one is resolved for me :). I have not answered my own question with this because I don't feel that what I have done is a proper solution to my problem.