有幾個是值得投入在你的網頁的額外部分。配置文件
下面的代碼允許您使用附加的PUT和DELETE HTTP動詞創建restfull控制器,並允許要顯示的S代表laravel的自定義錯誤頁,當你remotley調試服務器:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Laravel4" 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" appendQueryString="true" />
</rule>
</rules>
</rewrite>
<handlers>
<remove name="PHP53_via_FastCGI" />
<add name="PHP53_via_FastCGI" path="*.php" verb="GET,HEAD,POST,PUT,DELETE" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.3\php-cgi.exe" resourceType="Either" requireAccess="Script" />
</handlers>
<httpErrors errorMode="Detailed" />
</system.webServer>
</configuration>
非常有用的,謝謝。 – 2013-03-04 22:12:01
@jcadiz如何添加此代碼以及在公共或htacess中的位置。請幫忙 – 2013-08-05 19:01:27