Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How to use Laravel in Windows IIS

Laravel 4 in Windows Server IIS

###1. Put this web.config in laravel root diretory

<?xml version="1.0" encoding="UTF-8"?>
				<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" />
		<handlers accessPolicy="Read, Execute, Script" />
				<rule name="Imported Rule 3" 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" />						
					<action type="Rewrite" url="public/index.php/{R:1}" />

###2. Done. Don't move the public folder or any file :)

Copy link

brcontainer commented Mar 13, 2016

Thanks! Work fine in IIS Express for several frameworks like Laravel and Laravel5 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment