的WordPress的子目录我的控制之外的原因,我需要得到一个Laravel实例中运行的IIS里面10.我已经尽我的web.config配置<system.webServer><rewrite><rules />
里面每一个可能的选项的WordPress的子目录,但我只能得到一个或另一个工作。如果我将重写规则留在WordPress中,Laravel不起作用(WordPress使用404响应),如果我禁用WordPress规则,Laravel可以正常工作,但显然WordPress不支持。配置Laravel作为IIS
这里是在站点的根目录(如WordPress的坐)的配置:它让我把一个嵌套的web.config中
<rewrite>
<rules>
<rule name="WordPress" patternSyntax="Wildcard">
<match url="*" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<!-- Laravel App -->
<add input="{REQUEST_URI}" pattern="^/laravel" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
由于采用了SO搜索,我碰到这个来(IIS Url Rewrite not working with nested WP installs)的子文件夹Laravel应用程序有以下:
<rewrite>
<rules>
<clear />
<rule name="Imported Rule 2" 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" />
</conditions>
<action type="Rewrite" url="public/index.php/{R:1}" />
</rule>
</rules>
</rewrite>
奇怪的是,这些它几乎作品 - 只要我去site.com/laravel/public,所有相关工作的意见和一切戏剧很好ogether。我似乎无法取得URL的/ public,显然这是不可用的。
任何提示?我确定它很接近,但我无法弄清楚。