« Previous Next »

Thread: htaccess for Zend Framework 1.8

Last post 07-02-2009 4:52 AM by IceAngel89. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 06-05-2009, 9:37 PM

    htaccess for Zend Framework 1.8

    i am using Zend Framework 1.8 + Zend Server Community Edition + IIS7.5 (Windows 7 RC x64)

    the thing i am missing is HTACCESS support ... i dled the Rewrite Module in IIS already but have errors converting the Zend Framework htaccess file

    SetEnv APPLICATION_ENV development

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

    how can i do this? i think the main thing is i need to redirect all requests that are not for images/files etc to the "front controller" or the index.php file 

  • 06-08-2009, 1:33 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 636

    Re: htaccess for Zend Framework 1.8

    Try importing these rules instead:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

    URL Rewrite Module does not support -s and -l flags.

    The only difference between this rule set and the original one is that with this ruleset requests for empty files and symbolic links will be rewritten to index.php. If your application does not have any of those then it is safe to use this rule instead of original one.

    http://ruslany.net
  • 06-23-2009, 1:10 PM In reply to

    Re: htaccess for Zend Framework 1.8

    IIS7 URL Rewrite:
    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
                <rules>
                    <rule name="index-bootstrap">
                        <conditions>
                            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        </conditions>
                        <match url=".?" />
                        <action type="Rewrite" url="index.php" />
                    </rule>
                </rules>
            </rewrite>
        </system.webServer>
    </configuration>

    Apache mod_rewite:
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .? index.php [L,QSA]
  • 07-02-2009, 4:52 AM In reply to

    Re: htaccess for Zend Framework 1.8

    any way i can have the

    SetEnv APPLICATION_ENV development

    to work? i think i saw that somewhere b4

Page 1 of 1 (4 items)