Skip to content

Instantly share code, notes, and snippets.

@csdy
Created July 15, 2015 07:55
Show Gist options
  • Select an option

  • Save csdy/9ae6d7caffdbcb5aa0fc to your computer and use it in GitHub Desktop.

Select an option

Save csdy/9ae6d7caffdbcb5aa0fc to your computer and use it in GitHub Desktop.
PhalconPHP URLRewrite (IIS 8.5)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect non-existent files and folders to index.php" stopProcessing="true">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?_url=/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect default requests to public folder" stopProcessing="true">
<match url="^$" />
<action type="Rewrite" url="public/" />
</rule>
<rule name="Redirect all requests to public folder" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="public/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment