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 similar for CI
(link)
but it doesn't work on laravel
(of course I removed the index.php
redirection).
actually only home page works (www.mysite.com/public
)
anybody uses/d IIS7
with Laravel?
thanks in advance
I created the web.config
file in root folder inside <configuration></configuration>
:
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="default.aspx" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
</files>
</defaultDocument>
<handlers accessPolicy="Read, Execute, Script" />
<rewrite>
<rules>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="public/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
then copy the index.php
file of the public folder into the root folder of the project modifying the ../paths.php
into paths.php
as this guide says
now everything works perfectly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With