2017-09-21 58 views
0

從某位高手處看到這一點。在Symfony 1.4項目中更改域時發生錯誤

我有我的symfony 1.4項目在一個領域工作完美,現在我改變了項目,因爲它是到另一個域(相同,但完成在.net而不是.com)。現在主頁工作,但所有其他頁面或鏈接到同一頁面的目的地顯示錯誤「未找到頁面」。奇怪的是,當我在路由前使用擴展名frontend.php或index.php時,它工作正常。 (在開發模式下所有的作品...)。

當然,我清除緩存很多次...

任何想法?爲什麼更改域路由停止工作?

我也改變了所有的htaccess擴展的新項目......

謝謝!

+2

聲音鏈接的RewriteRules失蹤。檢查服務器配置。 – user2182349

回答

0

您需要mod_rewrite的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> 
相關問題