1
我在IIS服务器上安装了symfony2框架。symfony2 baseUrl不能在IIS中使用prod
当我输入http://localhost/myAlias/app_dev.php
,它工作正常,我的路由发送给我http://localhost/myAlias/app_dev.php
。
当我键入http://localhost/myAlias
隐含app.php,我收到没有找到与 “GET/myAlias”和我所有的依赖文件(CSS/JS)航线,指向http://localhost/bundles/file.js
它看起来像的Symfony2如果没有/ myAlias,就会导致基本Url错误。但我读的地方没有IIS Rewritebase/myAlias相当于为Apache
我的IIS的web.config工作正常
<system.webServer>
<defaultDocument enabled="true">
<files>
<add value="app.php" />
</files>
</defaultDocument>
<rewrite>
<rules>
<rule name="call app.php" enabled="true" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
</conditions>
<action type="Rewrite" url="app.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
难道我忘了检查框?