ありがとうございました。あなたは私を答えに導いた。
no_script_name
プロパティは、問題の原因ではありませんでした。代わりに、Webディレクトリに私の.htaccess
が生成されました。私はこのファイルを編集していないことを私のペットの頭に誓っています。
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase/
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
そして、これが(最後の行を見て、再び)1を更新されます。以下はsymfonyによって生成されたファイル(ボールド属性は、コード1内で作業されていない、最後の行を見て)は、次のとおりです。
Options +FollowSymLinks +ExecCGI
<IfModule mod_rewrite.c>
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
#RewriteBase/
# we skip all files with .something
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ **/myApp/index.php** [QSA,L]
</IfModule>
私は何が起こったのかわからないが、私は同様の問題があるI symfony公式サイトでチェックします。
それは私の2番目のアプローチでした:P、それはあなたがそれを理解することができることを知って素晴らしいです!乾杯 – guiman
* no_script_name *が問題でなかった場合、なぜそれが問題であると言われた他の答えを受け入れたのですか? – hakre