Skip to content

Instantly share code, notes, and snippets.

@byhoratiss
Forked from fabiancarlos/web.config
Created December 4, 2012 01:14
Show Gist options
  • Save byhoratiss/4199624 to your computer and use it in GitHub Desktop.
Save byhoratiss/4199624 to your computer and use it in GitHub Desktop.
Kohana 3.2 URL Rewrite of the IIS 7/Windows 2008 **using conversor of .htaccess to web.config
<!--# link: http://learn.iis.net/page.aspx/470/importing-apache-modrewrite-rules/ -->
<configuration>
<system.webServer>
<rewrite>
<rules>
<!--# Turn on URL rewriting-->
<!--# Protect hidden files from being viewed-->
<!--# Protect application and system files from being viewed-->
<rule name="Imported Rule 9" stopProcessing="true">
<match url="^(?:application|modules|system)\b.*" ignoreCase="false" />
<action type="Rewrite" url="index.php/{R:0}" />
</rule>
<!--# Rewrite all other URLs to index.php/URL-->
<rule name="Imported Rule 10">
<match url=".*" ignoreCase="false" />
<conditions>
<!--# Allow any files or directories that exist to be displayed directly-->
<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="index.php/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment