非常感謝您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