非常感谢您Guiman。你已经把我引向了答案。
的no_script_name
财产不是问题的根源。相反,我的网页目录中有我的.htaccess
这是很糟糕的生成(我发誓在我的宠物的头上,我以前没有编辑过这个文件)。下面是symfony中产生的文件(加粗属性不是一个代码中工作,看看最后一行):
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>
,这是(再次,看看最后一行)更新之一:
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>
我不知道发生了什么,但我会检查symfony网站,我也有类似的问题。
那么这将是我的第二种方法:P,知道你可以自己想象出来是很了不起的!欢呼声 – guiman 2012-02-08 13:26:55