setting up laravel on IIS7

前端 未结 8 1874
别那么骄傲
别那么骄傲 2020-12-15 02:11

I want to set up my IIS7 server in order to let it works with a web application written in laravel (php framework).

I found something simil

相关标签:
8条回答
  • 2020-12-15 02:44

    To install IIS on your windows, goto control panel -> uninstall programs and press Turn Off Windows Features On/Off link and click IIS and select CGI option.

    Download Web Platform Installer from internet install PHP and SQL drivers for IIS

    Open IIS from programs add Website. and for public folder point point to Public folder in the laravel/lumen project.

    for Laravel and Lumen projects. Create project from composer in any accessible folder. got to public folder in the folder structure and create web.config file with below contents i obtained this from laracasts

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
        <system.webServer>
            <rewrite>
              <rules>
                <rule name="Rule 1" stopProcessing="true">
                  <match url="^(.*)/$" ignoreCase="false" />
                  <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
                </rule>
                <rule name="Rule 2" stopProcessing="true">
                  <match url="^" ignoreCase="false" />
                  <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                  </conditions>
                  <action type="Rewrite" url="index.php" />
                </rule>
              </rules>
            </rewrite>
        </system.webServer>
    </configuration> 
    
    0 讨论(0)
  • 2020-12-15 02:47

    If you want to be able to retrieve your $_GET variables do not use:

    <match url="^(.*)$" ignoreCase="false" />

    Instead use:

    <match url="^" ignoreCase="false" />

    0 讨论(0)
提交回复
热议问题