1
iisのcakephpアプリケーションに.htaccessを置き換えるためにweb.configを使用する方法はありますか?we.configとcakephpアプリケーション
現在の.htaccessファイル
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
UPDATE:IIS6にインポートを使用し
。それは私にこのweb.configを与えますが、サイトは機能しません。白い画面が表示されます。このhttp://book.cakephp.org/revisions/view/19937/URL-Rewrites-on-IIS7-Windows-hostsも試してみましたが、どちらもうまくいきませんでした。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^$" ignoreCase="false" />
<action type="Rewrite" url="webroot/" />
</rule>
<rule name="Imported Rule 2" stopProcessing="true">
<match url="(.*)" ignoreCase="false" />
<action type="Rewrite" url="webroot/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
IIS 7にはURLの書き換えが組み込まれており、web.configファイルを使用できると聞いていただきありがとうございます。聞いたことがありますか? – madphp
私はそれが標準としてインストールされているとは思わないが、インストールされていない場合は、Web Platform Installerを使用してダウンロードできます。インストールが完了したら、IISマネージャーのIISセクションにある「URL書き換え」アイコンをダブルクリックしてルールを追加できます。そこに入力するルールはweb.configファイルに保存されます。 –
これはあなたを助けましたか?もう助けてもいいですか? –