Skip to content

Instantly share code, notes, and snippets.

@microdesign
Forked from jatubio/web.config
Last active January 26, 2016 15:26
Show Gist options
  • Save microdesign/71b3a5601295800bfb20 to your computer and use it in GitHub Desktop.
Save microdesign/71b3a5601295800bfb20 to your computer and use it in GitHub Desktop.
IIS web.config file for Laravel 5
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- Quitar los slash '/' del final de la ruta -->
<rule name="RewriteRequestsToPublic">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="/{R:0}" />
</rule>
<!-- Si el archivo o carpeta solicitado no existe, se realiza la petición a través de index.php -->
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment